* [patch] Fix a value leak by VAROBJ
@ 2009-03-09 18:22 Jan Kratochvil
2009-03-09 22:33 ` Vladimir Prus
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2009-03-09 18:22 UTC (permalink / raw)
To: gdb-patches
Hi,
a memory leak. install_new_value() already release_value()s `var->value'.
No regressions on x86_64-unknown-linux-gnu (there is now a recent regression
on HEAD for gdb.base/sigbpt.exp but it is unrelated to this patch).
Thanks,
Jan
gdb/
2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* varobj.c (free_variable): Call value_free.
--- gdb/varobj.c 5 Feb 2009 17:28:21 -0000 1.123
+++ gdb/varobj.c 9 Mar 2009 17:35:49 -0000
@@ -1512,6 +1512,8 @@ new_root_variable (void)
static void
free_variable (struct varobj *var)
{
+ value_free (var->value);
+
/* Free the expression if this is a root variable. */
if (is_root_p (var))
{
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] Fix a value leak by VAROBJ
2009-03-09 18:22 [patch] Fix a value leak by VAROBJ Jan Kratochvil
@ 2009-03-09 22:33 ` Vladimir Prus
2009-03-09 23:31 ` Jan Kratochvil
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2009-03-09 22:33 UTC (permalink / raw)
To: gdb-patches
Jan Kratochvil wrote:
> Hi,
>
> a memory leak. install_new_value() already release_value()s `var->value'.
>
> No regressions on x86_64-unknown-linux-gnu (there is now a recent regression
> on HEAD for gdb.base/sigbpt.exp but it is unrelated to this patch).
>
>
> Thanks,
> Jan
>
>
> gdb/
> 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * varobj.c (free_variable): Call value_free.
>
> --- gdb/varobj.c 5 Feb 2009 17:28:21 -0000 1.123
> +++ gdb/varobj.c 9 Mar 2009 17:35:49 -0000
> @@ -1512,6 +1512,8 @@ new_root_variable (void)
> static void
> free_variable (struct varobj *var)
> {
> + value_free (var->value);
> +
> /* Free the expression if this is a root variable. */
> if (is_root_p (var))
> {
This is OK.
Thanks,
Volodya
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-09 22:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 18:22 [patch] Fix a value leak by VAROBJ Jan Kratochvil
2009-03-09 22:33 ` Vladimir Prus
2009-03-09 23:31 ` Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox