aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-06-02 11:01:30 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-06-24 23:44:42 +0200
commita3a55d80ecc7cb44239b774a6a1d37adc6bf2fc8 (patch)
tree125958e7315a36e5641c9606d49ebb75e433692f
parente9f0dd43bcbeb47e72e4f9d18c86d8e4b0b19739 (diff)
http2: free all header memory after the push callback
-rw-r--r--lib/http2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 674a39c09..5587b3d2b 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -296,6 +296,7 @@ static int push_promise(struct SessionHandle *data,
struct curl_pushheaders heads;
CURLMcode rc;
struct http_conn *httpc;
+ size_t i;
/* clone the parent */
CURL *newhandle = duphandle(data);
if(!newhandle) {
@@ -315,7 +316,9 @@ static int push_promise(struct SessionHandle *data,
stream->push_headers_used, &heads,
data->multi->push_userp);
- /* free the headers array again */
+ /* free the headers again */
+ for(i=0; i<stream->push_headers_used; i++)
+ free(stream->push_headers[i]);
free(stream->push_headers);
stream->push_headers = NULL;