[master] aefd39e Free the allocation for the HPACK dynamic table

Dag Haavi Finstad daghf at varnish-software.com
Tue Aug 8 15:49:06 CEST 2017


commit aefd39e7b913e32793aa3902e33f6c8bb734e2b3
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date:   Fri Jul 7 13:58:44 2017 +0200

    Free the allocation for the HPACK dynamic table
    
    This adds a call to VHT_Fini just before we let go of the h2_sess in
    h2_del_req.

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index f820d05..a264626 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -185,6 +185,7 @@ h2_del_req(struct worker *wrk, struct h2_req *r2)
 	if (r)
 		return;
 	/* All streams gone, including stream #0, clean up */
+	VHT_Fini(h2->dectbl);
 	req = h2->srq;
 	AZ(req->ws->r);
 	Req_Cleanup(sp, wrk, req);
diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c
index 80f50aa..e30eb8e 100644
--- a/bin/varnishd/http2/cache_http2_session.c
+++ b/bin/varnishd/http2/cache_http2_session.c
@@ -103,7 +103,6 @@ h2_new_sess(const struct worker *wrk, struct sess *sp, struct req *srq)
 		h2->local_settings = H2_proto_settings;
 		h2->remote_settings = H2_proto_settings;
 
-		/* XXX: Lacks a VHT_Fini counterpart. Will leak memory. */
 		AZ(VHT_Init(h2->dectbl,
 			h2->local_settings.header_table_size));
 



More information about the varnish-commit mailing list