2011-02-28 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Mon, 28 Feb 2011 18:48:18 +0000 (18:48 +0000)
committerMichael Snyder <msnyder@vmware.com>
Mon, 28 Feb 2011 18:48:18 +0000 (18:48 +0000)
* breakpoint.c (catch_syscall_completer): Free malloced list.

gdb/ChangeLog
gdb/breakpoint.c

index 5aabdf8269e3209c661f1f559a5c4eb18bc49e1d..c6f218e1dd3a2817f435a970096f7be41a9c44c1 100644 (file)
@@ -1,5 +1,7 @@
 2011-02-28  Michael Snyder  <msnyder@vmware.com>
 
+       * breakpoint.c (catch_syscall_completer): Free malloced list.
+
        * jv-lang.c (java_primitive_type_from_name): Add missing break.
 
        * opencl-lang.c (lval_func_check_validity): Rename inner variables.
index 84b1c8d0102f019b2542df770c0845473082025b..bb9927c408af86b5958072c6b6a4829c9439ccba 100644 (file)
@@ -11360,8 +11360,11 @@ catch_syscall_completer (struct cmd_list_element *cmd,
                          char *text, char *word)
 {
   const char **list = get_syscall_names ();
+  char **retlist
+    = (list == NULL) ? NULL : complete_on_enum (list, text, word);
 
-  return (list == NULL) ? NULL : complete_on_enum (list, text, word);
+  xfree (list);
+  return retlist;
 }
 
 /* Tracepoint-specific operations.  */