From: Willy Tarreau Date: Mon, 1 Jan 2007 22:32:30 +0000 (+0100) Subject: [CRITICAL] fixed memory leak in session_free() X-Git-Tag: v1.3.4~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41dff82b54640e4b17ee0c9c17917dd6396fd90f;p=thirdparty%2Fhaproxy.git [CRITICAL] fixed memory leak in session_free() Since the introduction of hdr_idx, session_free() had not been updated to free the header ! It implied a consumption of about 400 bytes per new session. --- diff --git a/src/session.c b/src/session.c index 7a19136aa9..45af997c13 100644 --- a/src/session.c +++ b/src/session.c @@ -39,6 +39,9 @@ void session_free(struct session *s) if (s->rep) pool_free(buffer, s->rep); + if (s->hreq.hdr_idx.v != NULL) + pool_free_to(s->fe->hdr_idx_pool, s->hreq.hdr_idx.v); + if (s->rsp_cap != NULL) { struct cap_hdr *h; for (h = s->fe->fiprm->rsp_cap; h; h = h->next) {