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]

[RFA] bfd/dwarf2.c/scan_unit_for_symbols, fix a memory leak.


ok?

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

	* dwarf2.c (scan_unit_for_symbols): Stop memory leak.

Index: dwarf2.c
===================================================================
RCS file: /cvs/src/src/bfd/dwarf2.c,v
retrieving revision 1.138
diff -u -p -u -p -r1.138 dwarf2.c
--- dwarf2.c	29 Oct 2010 12:10:23 -0000	1.138
+++ dwarf2.c	3 Mar 2011 20:09:27 -0000
@@ -2148,7 +2148,7 @@ scan_unit_for_symbols (struct comp_unit 
 	{
 	  info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr);
 	  if (info_ptr == NULL)
-	    return FALSE;
+	    goto fail;
 
 	  if (func)
 	    {

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