aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-03-31 11:28:03 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-03-31 11:28:03 +0000
commit371a25eee959c1bbf661eafddae40257cca6b5d5 (patch)
treef27c9b048c399b8bf59407faecef370607de47b8
parente535a71c71f77b1ae7eee0de17575febee5ced66 (diff)
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
-rw-r--r--lib/easy.c3
1 files changed, 2 insertions, 1 deletions
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);