This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] gdb/tui: Use cleanups to free string copies.


*** TEST RESULTS FOR COMMIT c101f28fea4fc8621bdf864bc6e2132244dbe6a7 ***

Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: c101f28fea4fc8621bdf864bc6e2132244dbe6a7

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]