[master] d2d121f Don't access struct http after teardown

Poul-Henning Kamp phk at FreeBSD.org
Thu Apr 6 12:25:06 CEST 2017


commit d2d121f053b1009385c27b972eb5192aeac3d6ac
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Apr 6 10:23:43 2017 +0000

    Don't access struct http after teardown
    
    Fixes #2263

diff --git a/bin/varnishd/http2/cache_http2_hpack.c b/bin/varnishd/http2/cache_http2_hpack.c
index 9bcc1dd..a7fe43d 100644
--- a/bin/varnishd/http2/cache_http2_hpack.c
+++ b/bin/varnishd/http2/cache_http2_hpack.c
@@ -305,10 +305,10 @@ h2h_decode_bytes(struct h2_sess *h2, struct h2h_decode *d,
 		}
 
 		if (d->error == H2SE_ENHANCE_YOUR_CALM) {
-			http_Teardown(hp);
 			d->out = d->reset;
 			d->out_l = hp->ws->r - d->out;
 			d->out_u = 0;
+			http_Teardown(hp);
 			assert(d->out_u < d->out_l);
 		} else if (d->error)
 			break;



More information about the varnish-commit mailing list