Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] transport-helper: remove duplicate free()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:49

Daniel Barkalow [off-list ref] writes:
On Wed, 2 Dec 2009, Tay Ray Chuan wrote:
quoted
Remove the free() invocation on transport->data in release_helper(), as
disconnect_helper() has already done so.
You need to remove the one in disconnect_helper, because the entire point 
of disconnect_helper as opposed to release_helper is to *not* free that 
memory. If you remove this one, you'll access freed memory in any case 
where the helper has to be quit and restarted.
Thanks.  I did two things:

 - Since the bottom commit cannot be rewritten (as it is based on the
   version that is before the change in the caller to free it), I queued a
   one liner to remove the free from the callee in 'next'.

 - The problem will surface when the series is later merged to 'master'.
   I told my rerere database about the necessity of this "evil merge", so
   that we will automatically have the equivalent of the one-liner when it
   happens.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help