From c38eea1ac5c05edb0dd52cfe35d1cc6f84b8d0f3 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 28 Feb 2011 18:48:18 +0000 Subject: [PATCH] 2011-02-28 Michael Snyder * breakpoint.c (catch_syscall_completer): Free malloced list. --- gdb/ChangeLog | 2 ++ gdb/breakpoint.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5aabdf8269e..c6f218e1dd3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2011-02-28 Michael Snyder + * 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. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 84b1c8d0102..bb9927c408a 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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. */