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] linux-tdep.c (linux_get_siginfo_type): Stop memory leak.


arch_type calls xstrdup, so no need for the caller to do it.

checked in.

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

	* linux-tdep.c (linux_get_siginfo_type): Stop memory leak.

Index: linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-tdep.c,v
retrieving revision 1.10
diff -u -p -r1.10 linux-tdep.c
--- linux-tdep.c	1 Jan 2011 15:33:10 -0000	1.10
+++ linux-tdep.c	5 Mar 2011 21:15:10 -0000
@@ -88,8 +88,8 @@ linux_get_siginfo_type (struct gdbarch *
   TYPE_TARGET_STUB (uid_type) = 1;
 
   /* __clock_t */
-  clock_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF, TYPE_LENGTH (long_type),
-			  xstrdup ("__clock_t"));
+  clock_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
+			  TYPE_LENGTH (long_type), "__clock_t");
   TYPE_TARGET_TYPE (clock_type) = long_type;
   TYPE_TARGET_STUB (clock_type) = 1;
 

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