]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] appsession's sessid must be reset at end of transaction
authorWilly Tarreau <w@1wt.eu>
Sat, 9 Jan 2010 12:57:26 +0000 (13:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 9 Jan 2010 12:57:26 +0000 (13:57 +0100)
If we don't do that, we may corrupt the pools in keep-alive sessions.

src/proto_http.c
src/session.c

index 32284fe2733e7930b776095133305024fb285004..498642279e3715d6216157db0edd5f46c41c2bee 100644 (file)
@@ -6357,6 +6357,8 @@ void http_end_txn(struct session *s)
        pool_free2(pool2_requri, txn->uri);
        pool_free2(pool2_capture, txn->cli_cookie);
        pool_free2(pool2_capture, txn->srv_cookie);
+       pool_free2(apools.sessid, s->sessid);
+       s->sessid = NULL;
        txn->uri = NULL;
        txn->srv_cookie = NULL;
        txn->cli_cookie = NULL;
index 5e8c990abf746405d382bb914eb335ceaa49b7ff..65e22f601d0c0c10caf1493903db38310a7458db 100644 (file)
@@ -78,9 +78,6 @@ void session_free(struct session *s)
        pool_free2(pool2_buffer, s->req);
        pool_free2(pool2_buffer, s->rep);
 
-       if (s->sessid)
-               pool_free2(apools.sessid, s->sessid);
-
        http_end_txn(s);
 
        if (fe) {