Re: [PATCH v4 05/25] sequencer: eventually release memory allocated for the option values
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 19, 2016, 01:12 UTC
- Message-ID
- <xmqq1szdnnvc.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <alpine.DEB.2.20.1610181356460.197091@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 8 quoted lines
>> > To remedy that, we now take custody of the option values in question, >> > requiring those values to be malloc()ed or strdup()ed >> >> That is the approach this patch takes, so "eventually release" in >> the title is no longer accurate, I would think. > > To the contrary, we now free() things in remove_state(), so we still > "eventually release" the memory.
OK. We call a change to teach remove_state() to free the resource does more commonly as "plug leaks"; the word "eventually" gave me an impression that we are emphasizing the fact that we do not free(3) immediately but lazily do so at the end, hence my response.