mirror of
https://github.com/curl/curl.git
synced 2026-07-23 00:37:23 +03:00
easy: Fixed a memory leak on OOM condition
This commit is contained in:
parent
3521e4e40d
commit
a660c0dbe6
1 changed files with 9 additions and 0 deletions
|
|
@ -715,6 +715,15 @@ static CURLcode easy_transfer(CURLM *multi)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure to return some kind of error if there was a multi problem */
|
||||
if(mcode) {
|
||||
return (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY :
|
||||
/* The other multi errors should never happen, so return
|
||||
something suitably generic */
|
||||
CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue