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] py-auto-load.c: Call xfree instead of free.


Hi.

I was doing an audit of the calls to free in gdb and found this one.
Committed.

2011-12-10  Doug Evans  <dje@google.com>

	* python/py-auto-load.c (source_section_scripts): Call xfree
	instead of free.

Index: python/py-auto-load.c
===================================================================
RCS file: /cvs/src/src/gdb/python/py-auto-load.c,v
retrieving revision 1.14
diff -u -p -r1.14 py-auto-load.c
--- python/py-auto-load.c	27 Oct 2011 15:46:10 -0000	1.14
+++ python/py-auto-load.c	10 Dec 2011 22:43:48 -0000
@@ -314,7 +314,7 @@ Use `info auto-load-scripts [REGEXP]' to
 	  if (! in_hash_table)
 	    source_python_script_for_objfile (objfile, full_path);
 	  fclose (stream);
-	  free (full_path);
+	  xfree (full_path);
 	}
     }
 }


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