Re: [PATCH 1/2] refs/files-backend: duplicate strings added to affected_refnames

2017-08-28 Thread Martin Ågren
On 28 August 2017 at 10:06, Michael Haggerty wrote: > On Sat, Aug 26, 2017 at 12:16 PM, Martin Ågren wrote: >> On 25 August 2017 at 23:00, Junio C Hamano wrote: >>> Martin Ågren writes: >>> files_transaction_prepare() and the functions it calls add strings to a string list without dup

Re: [PATCH 1/2] refs/files-backend: duplicate strings added to affected_refnames

2017-08-28 Thread Michael Haggerty
On Sat, Aug 26, 2017 at 12:16 PM, Martin Ågren wrote: > On 25 August 2017 at 23:00, Junio C Hamano wrote: >> Martin Ågren writes: >> >>> files_transaction_prepare() and the functions it calls add strings to a >>> string list without duplicating them, i.e., we keep the original raw >>> pointers w

Re: [PATCH 1/2] refs/files-backend: duplicate strings added to affected_refnames

2017-08-26 Thread Martin Ågren
On 25 August 2017 at 23:00, Junio C Hamano wrote: > Martin Ågren writes: > >> files_transaction_prepare() and the functions it calls add strings to a >> string list without duplicating them, i.e., we keep the original raw >> pointers we were given. That is "ok", since we keep them only for a >> s

Re: [PATCH 1/2] refs/files-backend: duplicate strings added to affected_refnames

2017-08-25 Thread Junio C Hamano
Martin Ågren writes: > files_transaction_prepare() and the functions it calls add strings to a > string list without duplicating them, i.e., we keep the original raw > pointers we were given. That is "ok", since we keep them only for a > short-enough time, but we end up leaking some of them. Sor

[PATCH 1/2] refs/files-backend: duplicate strings added to affected_refnames

2017-08-25 Thread Martin Ågren
files_transaction_prepare() and the functions it calls add strings to a string list without duplicating them, i.e., we keep the original raw pointers we were given. That is "ok", since we keep them only for a short-enough time, but we end up leaking some of them. Switch to duplicating the strings,