[5.2] e19efd7 Free decode object on failure
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Fri Sep 15 11:17:19 UTC 2017
commit e19efd7283b4654a00125735695ab0b3c2639469
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Mon Sep 11 23:25:18 2017 +0100
Free decode object on failure
To be revisited post release.
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index c5d9530..4dc75f1 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -209,8 +209,10 @@ h2_kill_req(struct worker *wrk, const struct h2_sess *h2,
AZ(pthread_cond_signal(r2->cond));
r2 = NULL;
} else {
- if (r2->state == H2_S_OPEN)
+ if (r2->state == H2_S_OPEN) {
(void)h2h_decode_fini(h2, r2->decode);
+ FREE_OBJ(r2->decode);
+ }
}
Lck_Unlock(&h2->sess->mtx);
if (r2 != NULL)
@@ -596,6 +598,7 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
VSLb(h2->vsl, SLT_Debug, "HPACK(hdr) %s", h2e->name);
Lck_Unlock(&h2->sess->mtx);
(void)h2h_decode_fini(h2, r2->decode);
+ FREE_OBJ(r2->decode);
AZ(r2->req->ws->r);
h2_del_req(wrk, r2);
return (h2e);
@@ -630,6 +633,7 @@ h2_rx_continuation(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
VSLb(h2->vsl, SLT_Debug, "HPACK(cont) %s", h2e->name);
Lck_Unlock(&h2->sess->mtx);
(void)h2h_decode_fini(h2, r2->decode);
+ FREE_OBJ(r2->decode);
AZ(r2->req->ws->r);
h2_del_req(wrk, r2);
return (h2e);
More information about the varnish-commit
mailing list