http2: fix handle leak in error path

Add missing newhandle free call in push_promise().

Closes #1416
This commit is contained in:
Larry Stefani 2017-04-13 10:06:14 -04:00 committed by Daniel Stenberg
parent fc347820a2
commit 1451271e08

View File

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