]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CRITICAL] fixed memory leak in session_free()
authorWilly Tarreau <w@1wt.eu>
Mon, 1 Jan 2007 22:32:30 +0000 (23:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 1 Jan 2007 22:32:30 +0000 (23:32 +0100)
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.

src/session.c

index 7a19136aa9c27b23e5c0a79ca57f88466bc93074..45af997c136bea8873582697c977d264c15aed91 100644 (file)
@@ -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) {