mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:23:32 +03:00
OOM handling/cleanup slight adjustments
This commit is contained in:
parent
a84b8a3922
commit
584dc8b8af
7 changed files with 38 additions and 21 deletions
|
|
@ -1855,6 +1855,7 @@ static CURLcode push_certinfo_len(struct SessionHandle *data,
|
|||
equivalent of curl_slist_append but doesn't strdup() the given data as
|
||||
like in this place the extra malloc/free is totally pointless */
|
||||
nl = curl_slist_append(ci->certinfo[certnum], output);
|
||||
free(output);
|
||||
if(!nl) {
|
||||
curl_slist_free_all(ci->certinfo[certnum]);
|
||||
ci->certinfo[certnum] = NULL;
|
||||
|
|
@ -1863,8 +1864,6 @@ static CURLcode push_certinfo_len(struct SessionHandle *data,
|
|||
else
|
||||
ci->certinfo[certnum] = nl;
|
||||
|
||||
free(output);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue