This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 2/5][libbacktrace] Fix memory leak in build_address_map
- From: "Ian Lance Taylor via gcc-patches" <gcc-patches at gcc dot gnu dot org>
- To: Tom de Vries <tdevries at suse dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <ian at airs dot com>
- Date: Thu, 27 Dec 2018 08:26:36 -0800
- Subject: Re: [PATCH 2/5][libbacktrace] Fix memory leak in build_address_map
- References: <20181128231617.GA3951@delia>
- Reply-to: Ian Lance Taylor <iant at google dot com>
On Wed, Nov 28, 2018 at 3:16 PM Tom de Vries <email@example.com> wrote:
> While upon failure in build_address_map we call free_unit_addrs_vector, this
> does not actually free the addrs vector, but merely the abbrevs of the units
> pointed at by the elements of the addrs vector.
> Fix this by adding code to build_address_map to make sure that the addrs vector
> is freed upon failure.
> Bootstrapped and reg-tested on x86_64.
> OK for trunk?
> - Tom
> [libbacktrace] Fix memory leak in build_address_map
> 2018-11-28 Tom de Vries <firstname.lastname@example.org>
> * dwarf.c (build_address_map): Free addrs vector upon failure.
This is OK.