]> granicus.if.org Git - curl/commitdiff
http2: fix handle leak in error path
authorLarry Stefani <larry.stefani@sonos.com>
Thu, 13 Apr 2017 14:06:14 +0000 (10:06 -0400)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 15 Apr 2017 21:37:30 +0000 (23:37 +0200)
Add missing newhandle free call in push_promise().

Closes #1416

lib/http2.c

index 270be071dd1e9af18682a48970ec0ad76829091f..264c66700ed612b3cd99a7d03c1f912c996fb2e2 100644 (file)
@@ -408,6 +408,7 @@ static int push_promise(struct Curl_easy *data,
     stream = data->req.protop;
     if(!stream) {
       failf(data, "Internal NULL stream!\n");
+      (void)Curl_close(newhandle);
       rv = 1;
       goto fail;
     }