mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
Curl_retry_request: fix memory leak
Detected by OSS-Fuzz Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10648 Closes #3042
This commit is contained in:
parent
e2dd435d47
commit
ef695fc301
@ -1705,8 +1705,13 @@ CURLcode Curl_retry_request(struct connectdata *conn,
|
||||
|
||||
if(conn->handler->protocol&PROTO_FAMILY_HTTP) {
|
||||
struct HTTP *http = data->req.protop;
|
||||
if(http->writebytecount)
|
||||
return Curl_readrewind(conn);
|
||||
if(http->writebytecount) {
|
||||
CURLcode result = Curl_readrewind(conn);
|
||||
if(result) {
|
||||
Curl_safefree(*url);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return CURLE_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user