Commit 371a25ee authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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
parent e535a71c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);