* [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* Re: [RFA] Fix memory leak in solib-svr4.c
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
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2012-08-14 15:14 UTC (permalink / raw)
To: gdb-patches
>>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
Gary> 2012-08-14 Gary Benson <gbenson@redhat.com>
Gary> * solib-svr4.c (svr4_free_library_list): Use free_so.
Ok. Thanks!
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Fix memory leak in solib-svr4.c
2012-08-14 15:14 ` Tom Tromey
@ 2012-08-14 16:17 ` Gary Benson
0 siblings, 0 replies; 3+ messages in thread
From: Gary Benson @ 2012-08-14 16:17 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
Tom Tromey wrote:
> >>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
>
> Gary> 2012-08-14 Gary Benson <gbenson@redhat.com>
> Gary> * solib-svr4.c (svr4_free_library_list): Use free_so.
>
> Ok. Thanks!
Committed.
Thanks,
Gary
--
http://gbenson.net/
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 992 bytes --]
Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.14582
retrieving revision 1.14583
diff -u -r1.14582 -r1.14583
--- gdb/ChangeLog 13 Aug 2012 15:44:00 -0000 1.14582
+++ gdb/ChangeLog 14 Aug 2012 16:16:03 -0000 1.14583
@@ -1,3 +1,7 @@
+2012-08-14 Gary Benson <gbenson@redhat.com>
+
+ * solib-svr4.c (svr4_free_library_list): Use free_so.
+
2012-08-13 Mike Frysinger <vapier@gentoo.org>
* .gitignore: Add go-exp.c.
Index: gdb/solib-svr4.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-svr4.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- gdb/solib-svr4.c 23 Jul 2012 15:25:12 -0000 1.165
+++ gdb/solib-svr4.c 14 Aug 2012 16:16:04 -0000 1.166
@@ -980,7 +980,7 @@
{
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