Re: [PATCH v2 2/2] refs/files-backend: fix memory leak in lock_ref_for_update

2017-08-29 Thread Martin Ågren
On 29 August 2017 at 10:39, Michael Haggerty wrote: > On 08/28/2017 10:32 PM, Martin Ågren wrote: >> After the previous patch, none of the functions we call hold on to >> `referent.buf`, so we can safely release the string buffer before >> returning. > > This patch looks good to me, but I did noti

Re: [PATCH v2 2/2] refs/files-backend: fix memory leak in lock_ref_for_update

2017-08-29 Thread Michael Haggerty
On 08/28/2017 10:32 PM, Martin Ågren wrote: > After the previous patch, none of the functions we call hold on to > `referent.buf`, so we can safely release the string buffer before > returning. This patch looks good to me, but I did notice a pre-existing problem in the area... > --- > refs/files

[PATCH v2 2/2] refs/files-backend: fix memory leak in lock_ref_for_update

2017-08-28 Thread Martin Ågren
After the previous patch, none of the functions we call hold on to `referent.buf`, so we can safely release the string buffer before returning. Signed-off-by: Martin Ågren --- refs/files-backend.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git