From: Daniel Stenberg Date: Sat, 31 Mar 2007 11:28:03 +0000 (+0000) Subject: When curl_easy_duphandle() fails because it can't get or make a connection X-Git-Tag: curl-7_16_2~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=371a25eee959c1bbf661eafddae40257cca6b5d5;p=thirdparty%2Fcurl.git When curl_easy_duphandle() fails because it can't get or make a connection cache, we must make sure not to derefence the NULL pointer... CID 6 coverity.com scan --- diff --git a/lib/easy.c b/lib/easy.c index dc18c74881..cdd3570a23 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -627,7 +627,8 @@ CURL *curl_easy_duphandle(CURL *incurl) if(fail) { if(outcurl) { - if(outcurl->state.connc->type == CONNCACHE_PRIVATE) + if((outcurl->state.connc->type == CONNCACHE_PRIVATE) && + outcurl->state.connc) Curl_rm_connc(outcurl->state.connc); if(outcurl->state.headerbuff) free(outcurl->state.headerbuff);