diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-07-06 18:16:24 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-07-10 12:39:03 +0100 |
commit | c101f28fea4fc8621bdf864bc6e2132244dbe6a7 (patch) | |
tree | ea1fd93cd91e517c7afac8138e9b51bd0cf48626 /zlib/contrib | |
parent | 150375dc7ac877d1dc6e8aaf73a23479b720306c (diff) | |
download | gdb-c101f28fea4fc8621bdf864bc6e2132244dbe6a7.zip gdb-c101f28fea4fc8621bdf864bc6e2132244dbe6a7.tar.gz gdb-c101f28fea4fc8621bdf864bc6e2132244dbe6a7.tar.bz2 |
gdb/tui: Use cleanups to free string copies.
In parse_scrolling_args it is possible for a string copy to leak if an
error occurs. Switching to using a cleanup fixes this leak.
In tui_set_win_height the string can't be leaked, but switching to using
a cleanup guards against the possibility that a leak could be introduced
in the future (by adding an error somewhere in the call stack).
gdb/ChangeLog:
* tui/tui-win.c (tui_set_win_height): Use a cleanup to free the
string copy.
(parse_scrolling_args): Likewise.
Diffstat (limited to 'zlib/contrib')
0 files changed, 0 insertions, 0 deletions