This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] tracepoint.c, scope_info, fix memory leak.
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 01 Mar 2011 14:15:05 -0800
- Subject: [commit] tracepoint.c, scope_info, fix memory leak.
We never used this result anyway.
Checked in.
2011-03-01 Michael Snyder <msnyder@vmware.com>
* tracepoint.c (scope_info): Fix mem leak, remove underused
variable.
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.213
diff -u -p -u -p -r1.213 tracepoint.c
--- tracepoint.c 24 Feb 2011 07:39:48 -0000 1.213
+++ tracepoint.c 1 Mar 2011 22:12:22 -0000
@@ -2327,7 +2327,7 @@ scope_info (char *args, int from_tty)
struct symbol *sym;
struct minimal_symbol *msym;
struct block *block;
- char **canonical, *symname, *save_args = args;
+ char *symname, *save_args = args;
struct dict_iterator iter;
int j, count = 0;
struct gdbarch *gdbarch;
@@ -2337,7 +2337,7 @@ scope_info (char *args, int from_tty)
error (_("requires an argument (function, "
"line or *addr) to define a scope"));
- sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
+ sals = decode_line_1 (&args, 1, NULL, 0, NULL, NULL);
if (sals.nelts == 0)
return; /* Presumably decode_line_1 has already warned. */