From 371a25eee959c1bbf661eafddae40257cca6b5d5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 31 Mar 2007 11:28:03 +0000 Subject: 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 --- lib/easy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/easy.c b/lib/easy.c index dc18c7488..cdd3570a2 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); -- cgit v1.2.3