easy: Fixed a memory leak on OOM condition

This commit is contained in:
Dan Fandrich 2014-02-19 08:57:00 +01:00
parent 3521e4e40d
commit a660c0dbe6

View File

@ -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;
}