diff options
author | Doug Evans <dje@google.com> | 2015-02-12 13:32:36 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2015-02-12 13:32:36 -0800 |
commit | 013d031916a1f154054c3b2ccc2d35fa9ff5e397 (patch) | |
tree | 02e0272301bbd2169a5ace5a586ca995296deed6 /gdb | |
parent | fa3f8d5ac61f98d5efde8dc92ba4c9f3dc12938b (diff) | |
download | gdb-013d031916a1f154054c3b2ccc2d35fa9ff5e397.zip gdb-013d031916a1f154054c3b2ccc2d35fa9ff5e397.tar.gz gdb-013d031916a1f154054c3b2ccc2d35fa9ff5e397.tar.bz2 |
completer.c (completion_list_add_name): Fix memory leak.
gdb/ChangeLog:
* completer.c (completion_list_add_name): Fix memory leak.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/symtab.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a680f24..175328a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2015-02-12 Doug Evans <dje@google.com> + * completer.c (completion_list_add_name): Fix memory leak. + +2015-02-12 Doug Evans <dje@google.com> + * completer.c (complete_line): Remove incorrect comment. 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> diff --git a/gdb/symtab.c b/gdb/symtab.c index 84e2680..5302afa 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); |