This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] tracepoint.c, create_tsv_from_upload: fix memory leak


checked in.

2011-03-01  Michael Snyder  <msnyder@vmware.com>

	* tracepoint.c (create_tsv_from_upload): Superfluous call
	to xstrdup.  Callee already calls xstrdup.

Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.214
diff -u -p -u -p -r1.214 tracepoint.c
--- tracepoint.c	1 Mar 2011 22:13:48 -0000	1.214
+++ tracepoint.c	1 Mar 2011 22:23:06 -0000
@@ -3190,7 +3190,7 @@ create_tsv_from_upload (struct uploaded_
     sprintf (buf, "%s_%d", namebase, try_num++);
 
   /* We have an available name, create the variable.  */
-  tsv = create_trace_state_variable (xstrdup (buf));
+  tsv = create_trace_state_variable (buf);
   tsv->initial_value = utsv->initial_value;
   tsv->builtin = utsv->builtin;
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]