Commit 8fc4abed authored by Marc Hoersken's avatar Marc Hoersken
Browse files

conncache.c: fix possible dereference of null pointer

parent c216179a
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -166,12 +166,15 @@ void Curl_conncache_remove_conn(struct conncache *connc,
    if(bundle->num_connections == 0) {
      conncache_remove_bundle(connc, bundle);
    }

    if(connc) {
      connc->num_connections--;

      DEBUGF(infof(conn->data, "The cache now contains %d members\n",
                   connc->num_connections));
    }
  }
}

/* This function iterates the entire connection cache and calls the
   function func() with the connection pointer as the first argument