aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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);