From: Olivier Houchard Date: Thu, 18 Oct 2018 14:22:02 +0000 (+0200) Subject: MINOR: streams: Call tasklet_free() after si_release_endpoint(). X-Git-Tag: v1.9-dev4~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7bd3e3c4c85530cee6b6e8890744c07541f1910;p=thirdparty%2Fhaproxy.git MINOR: streams: Call tasklet_free() after si_release_endpoint(). Make sure we call tasklet_free() only after si_release_endpoint(), when the unsubscribe() method has been called, so that we're sure the mux won't attempt to access the taslet. --- diff --git a/src/stream.c b/src/stream.c index e202b87e49..200556fe42 100644 --- a/src/stream.c +++ b/src/stream.c @@ -398,12 +398,13 @@ static void stream_free(struct stream *s) /* applets do not release session yet */ must_free_sess = objt_appctx(sess->origin) && sess->origin == s->si[0].end; - tasklet_free(s->si[0].wait_event.task); - tasklet_free(s->si[1].wait_event.task); si_release_endpoint(&s->si[1]); si_release_endpoint(&s->si[0]); + tasklet_free(s->si[0].wait_event.task); + tasklet_free(s->si[1].wait_event.task); + if (must_free_sess) session_free(sess);