Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Fix memory leak in solib-svr4.c
@ 2012-08-14 12:45 Gary Benson
  2012-08-14 15:14 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Benson @ 2012-08-14 12:45 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

Hi all,

I found a memory leak in solib-svr4.c: svr4_free_library_list uses
svr4_free_so, which frees the inner parts of the so_list but not
the so_list itself.  This patch fixes.

Ok to commit?

Thanks,
Gary

-- 
http://gbenson.net/

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 533 bytes --]

Organization: Red Hat UK Ltd, 64 Baker Street, 4th Floor, W1U 7DF, UK.
	Registered in England and Wales (3798903)

2012-08-14  Gary Benson  <gbenson@redhat.com>

	* solib-svr4.c (svr4_free_library_list): Use free_so.

diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 76bd872..2f4a345 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -980,7 +980,7 @@ svr4_free_library_list (void *p_list)
     {
       struct so_list *next = list->next;
 
-      svr4_free_so (list);
+      free_so (list);
       list = next;
     }
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-14 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14 12:45 [RFA] Fix memory leak in solib-svr4.c Gary Benson
2012-08-14 15:14 ` Tom Tromey
2012-08-14 16:17   ` Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox