mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:17:28 +03:00
c-hyper: fix another memory leak in Curl_http.
There is a `hyper_clientconn_free` call on the happy path, but not one on the error path. This commit adds one. Fixes the second memory leak reported by Valgrind in #10803. Fixes #10803 Closes #11729
This commit is contained in:
parent
c61dd5fed2
commit
e854166472
1 changed files with 4 additions and 0 deletions
|
|
@ -1217,6 +1217,7 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
|
|||
}
|
||||
|
||||
hyper_clientconn_free(client);
|
||||
client = NULL;
|
||||
|
||||
if((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) {
|
||||
/* HTTP GET/HEAD download */
|
||||
|
|
@ -1245,6 +1246,9 @@ error:
|
|||
if(handshake)
|
||||
hyper_task_free(handshake);
|
||||
|
||||
if(client)
|
||||
hyper_clientconn_free(client);
|
||||
|
||||
if(req)
|
||||
hyper_request_free(req);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue