[PATCH] Fix leak with internal functions
Simon Marchi
simark@simark.ca
Mon Apr 22 18:47:02 GMT 2024
On 4/22/24 2:05 PM, Tom Tromey wrote:
> diff --git a/gdb/value.c b/gdb/value.c
> index 1bd180a62cc..58e4a975485 100644
> --- a/gdb/value.c
> +++ b/gdb/value.c
> @@ -1882,6 +1882,11 @@ struct internalvar
> : name (std::move (name))
> {}
>
> + ~internalvar ()
> + {
> + clear_internalvar (this);
> + }
This struct should probably be made non-movable/assignable/copyable/etc
(or the appropriate ones should be implemented, if they are needed).
Simon
More information about the Gdb-patches
mailing list