On Wed, Nov 28, 2018 at 3:17 PM Tom de Vries <tdevr...@suse.de> wrote:
>
> In the main loop in build_address_map, we first read the abbrevs into a local
> variable abbrevs, and then allocate the corresponding unit, after which we 
> assign
> the abbrevs to the unit.  This results in dedicated free-upon-failure
> handling for the variable, and extra code to make sure that free-upon-failure
> doesn't trigger once the unit has taken ownership of the abbrevs.
>
> Simplify this by reversing the order of abbrev reading and unit allocation,
> and eliminating the abbrevs local variable.
>
> Bootstrapped and reg-tested on x86_64.
>
> OK for trunk?
>
> Thanks,
> - Tom
>
> [libbacktrace] Simplify memory management in build_address_map
>
> 2018-11-28  Tom de Vries  <tdevr...@suse.de>
>
>         * dwarf.c (build_address_map): Simplify by removing local variable
>         abbrevs.

This is OK.

Thanks.

Ian

Reply via email to