[PATCH 2/5][libbacktrace] Fix memory leak in build_address_map

Ian Lance Taylor via gcc-patches gcc-patches@gcc.gnu.org
Thu Dec 27 16:35:00 GMT 2018


On Wed, Nov 28, 2018 at 3:16 PM Tom de Vries <tdevries@suse.de> 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?
>
> Thanks,
> - Tom
>
> [libbacktrace] Fix memory leak in build_address_map
>
> 2018-11-28  Tom de Vries  <tdevries@suse.de>
>
>         * dwarf.c (build_address_map): Free addrs vector upon failure.

This is OK.

Thanks.

Ian



More information about the Gcc-patches mailing list