binutils-gdb/gdb/cli
Pedro Alves b0cba12e07 Plug source_command leak
The heap-allocated 'old_source_verbose' local was accidentally left
behind by commit 2ec845e758 ("More uses of scoped_restore").

Valgrind caught it, like:

 ==20123== 8 bytes in 1 blocks are definitely lost in loss record 4,609 of 13,785
 ==20123==    at 0x4C2A988: calloc (vg_replace_malloc.c:711)
 ==20123==    by 0x60A2F8: xcalloc (common-utils.c:84)
 ==20123==    by 0x4CDBE5: build_command_line(command_control_type, char const*) (cli-script.c:159)
 ==20123==    by 0x4CDC32: get_command_line(command_control_type, char const*) (cli-script.c:172)
 ==20123==    by 0x5230F1: python_command(char*, int) (python.c:421)
 ==20123==    by 0x4C61AD: do_cfunc(cmd_list_element*, char*, int) (cli-decode.c:106)
 ==20123==    by 0x4C911F: cmd_func(cmd_list_element*, char*, int) (cli-decode.c:1902)
 ==20123==    by 0x7CA79E: execute_command(char*, int) (top.c:650)
 ==20123==    by 0x695A0C: command_handler(char*) (event-top.c:590)
 ==20123==    by 0x7CA33F: read_command_file(_IO_FILE*) (top.c:461)
 ==20123==    by 0x4D0C3A: script_from_file(_IO_FILE*, char const*) (cli-script.c:1584)
 ==20123==    by 0x4C2727: source_script_from_stream(_IO_FILE*, char const*, char const*) (cli-cmds.c:589)

gdb/ChangeLog:
2017-08-17  Pedro Alves  <palves@redhat.com>

	* cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
	local.
2017-08-17 23:57:45 +01:00
..
cli-cmds.c Plug source_command leak 2017-08-17 23:57:45 +01:00
cli-cmds.h Change return type of find_and_open_script 2017-08-03 07:58:53 -06:00
cli-decode.c Introduce class completion_tracker & rewrite completion<->readline interaction 2017-07-17 14:45:59 +01:00
cli-decode.h Clean up "completer_handle_brkchars" callback handling 2017-07-17 12:05:03 +01:00
cli-dump.c Use gdb::unique_xmalloc_ptr when calling tilde_expand 2017-08-05 15:52:49 -06:00
cli-interp.c C++-fy struct interp/cli_interp/tui_interp/mi_interp 2017-02-03 16:30:04 +00:00
cli-interp.h C++-fy struct interp/cli_interp/tui_interp/mi_interp 2017-02-03 16:30:04 +00:00
cli-logging.c Move "tee" building down to interpreter::set_logging_proc 2017-02-02 22:00:43 +00:00
cli-script.c Replace do_restore_instream_cleanup with scoped_restore 2017-08-03 07:59:06 -06:00
cli-script.h Introduce command_line_up 2017-04-12 11:16:17 -06:00
cli-setshow.c Use ui_out_emit_tuple 2017-04-22 09:46:58 -06:00
cli-setshow.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
cli-utils.c -Wwrite-strings: Some constification in gdb/breakpoint.c 2017-04-05 19:21:36 +01:00
cli-utils.h -Wwrite-strings: Some constification in gdb/breakpoint.c 2017-04-05 19:21:36 +01:00