From: Willy Tarreau Date: Fri, 24 Nov 2017 14:01:10 +0000 (+0100) Subject: BUG/MEDIUM: stream: always release the stream-interface on abort X-Git-Tag: v1.8.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0542c8b39a3346ee653bb16a81ae5b974e4befba;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: stream: always release the stream-interface on abort The cache exhibited a but in process_stream() where upon abort it is possible to switch the stream-int's state to SI_ST_CLO without calling si_release_endpoint(), resulting in a possibly missing ->release() for the applet. It should affect all other applets as well (eg: lua, spoe, peers) and should carefully be backported to stable branches after some observation period. --- diff --git a/src/stream.c b/src/stream.c index d98c7f98de..63d2201122 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2180,6 +2180,7 @@ struct task *process_stream(struct task *t) } } else { + si_release_endpoint(si_b); si_b->state = SI_ST_CLO; /* shutw+ini = abort */ channel_shutw_now(req); /* fix buffer flags upon abort */ channel_shutr_now(res);