From 32211a17eb1f1a18d960ec2a451992a928aaaf95 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Fri, 1 Feb 2019 18:10:46 +0100 Subject: [PATCH] BUG/MEDIUM: stream: Don't forget to free s->unique_id in stream_free(). In stream_free(), free s->unique_id. We may still have one, because it's allocated in log.c::strm_log() no matter what, even if it's a TCP connection and thus it won't get free'd by http_end_txn(). Failure to do so leads to a memory leak. This should probably be backported to all maintained branches. --- src/stream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stream.c b/src/stream.c index 939c4dbc21..a96ddcb866 100644 --- a/src/stream.c +++ b/src/stream.c @@ -386,6 +386,8 @@ static void stream_free(struct stream *s) offer_buffers(NULL, tasks_run_queue); } + pool_free(pool_head_uniqueid, s->unique_id); + hlua_ctx_destroy(s->hlua); s->hlua = NULL; if (s->txn) -- 2.39.5