This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix a value leak by VAROBJ
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 10 Mar 2009 01:17:21 +0300
- Subject: Re: [patch] Fix a value leak by VAROBJ
- References: <20090309182211.GA21666@host0.dyn.jankratochvil.net>
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