* RFA: fix PR 8307
@ 2008-12-22 13:25 Tom Tromey
2008-12-22 13:54 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2008-12-22 13:25 UTC (permalink / raw)
To: gdb-patches
PR 8307 is about a small memory leak in environ.c.
This is just the patch from the PR.
Built and regtested on x86-64 (compile farm).
Also I ran it under valgrind, before and after, to verify.
Please review.
Tom
2008-12-22 Adam Denton <adenton@yahoo.com>
PR gdb/8307:
* environ.c (free_environ): Free e->vector.
diff --git a/gdb/environ.c b/gdb/environ.c
index ee471ad..cd40193 100644
--- a/gdb/environ.c
+++ b/gdb/environ.c
@@ -49,6 +49,7 @@ free_environ (struct gdb_environ *e)
while (*vector)
xfree (*vector++);
+ xfree (e->vector);
xfree (e);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-22 14:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-22 13:25 RFA: fix PR 8307 Tom Tromey
2008-12-22 13:54 ` Joel Brobecker
2008-12-22 14:08 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox