]> granicus.if.org Git - curl/commitdiff
http2: reset push header counter fixes crash
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Feb 2017 08:17:55 +0000 (09:17 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Feb 2017 08:20:08 +0000 (09:20 +0100)
When removing an easy handler from a multi before it completed its
transfer, and it had pushed streams, it would segfault due to the pushed
counted not being cleared.

Fixed-by: zelinchen@users.noreply.github.com
Fixes #1249

lib/http2.c

index 4d108da44968d8cac5aa6f6877e2b25e7568670f..dc7bd32e1b5f3a885bf3ad95ada743473792ed65 100644 (file)
@@ -415,6 +415,7 @@ static int push_promise(struct Curl_easy *data,
       free(stream->push_headers[i]);
     free(stream->push_headers);
     stream->push_headers = NULL;
+    stream->push_headers_used = 0;
 
     if(rv) {
       /* denied, kill off the new handle again */