aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-02-12 13:32:36 -0800
committerDoug Evans <dje@google.com>2015-02-12 13:32:36 -0800
commit013d031916a1f154054c3b2ccc2d35fa9ff5e397 (patch)
tree02e0272301bbd2169a5ace5a586ca995296deed6 /gdb/symtab.c
parentfa3f8d5ac61f98d5efde8dc92ba4c9f3dc12938b (diff)
downloadgdb-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/symtab.c')
-rw-r--r--gdb/symtab.c1
1 files changed, 1 insertions, 0 deletions
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);