From: Doug Evans Date: Thu, 12 Feb 2015 21:32:36 +0000 (-0800) Subject: completer.c (completion_list_add_name): Fix memory leak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=013d031916a1f154054c3b2ccc2d35fa9ff5e397;p=binutils-gdb.git completer.c (completion_list_add_name): Fix memory leak. gdb/ChangeLog: * completer.c (completion_list_add_name): Fix memory leak. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a680f245d73..175328a0fba 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-02-12 Doug Evans + + * completer.c (completion_list_add_name): Fix memory leak. + 2015-02-12 Doug Evans * completer.c (complete_line): Remove incorrect comment. diff --git a/gdb/symtab.c b/gdb/symtab.c index 84e268087ae..5302afaa5fb 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -5062,6 +5062,7 @@ completion_list_add_name (const char *symname, VEC_safe_push (char_ptr, return_val, new); throw_max_completions_reached_error (); case MAYBE_ADD_COMPLETION_MAX_REACHED: + xfree (new); throw_max_completions_reached_error (); case MAYBE_ADD_COMPLETION_DUPLICATE: xfree (new);