Re: [PATCH 3/5][libbacktrace] Fix memory leak in loop in build_address_map

2018-12-27 Thread Ian Lance Taylor via gcc-patches
On Wed, Nov 28, 2018 at 3:17 PM Tom de Vries wrote: > > When failing in build_address_map, we free the unit that's currently being > handled in the loop, but the ones that already have been allocated are leaked. > > Fix this by keeping track of allocated units in a vector, and releasing them > upo

[PATCH 3/5][libbacktrace] Fix memory leak in loop in build_address_map

2018-11-28 Thread Tom de Vries
Hi, When failing in build_address_map, we free the unit that's currently being handled in the loop, but the ones that already have been allocated are leaked. Fix this by keeping track of allocated units in a vector, and releasing them upon failure. Also, now that we have a vector of allocated un