From d7bd3e3c4c85530cee6b6e8890744c07541f1910 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 18 Oct 2018 16:22:02 +0200 Subject: [PATCH] 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. --- src/stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stream.c b/src/stream.c index e202b87e4..200556fe4 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); -- 2.47.3