prevent memory leak when going out of memory

This commit is contained in:
Daniel Stenberg 2003-08-14 14:20:03 +00:00
parent 02c78ecf81
commit 3454319c17

View File

@ -321,6 +321,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
malloc(sizeof(struct connectdata *) * data->state.numconnects);
if(!data->state.connects) {
free(data->state.headerbuff);
free(data);
return CURLE_OUT_OF_MEMORY;
}