conncache.c: fix possible dereference of null pointer

This commit is contained in:
Marc Hoersken 2014-01-04 16:34:58 +01:00
parent c216179af4
commit 8fc4abedf1

View File

@ -166,10 +166,13 @@ void Curl_conncache_remove_conn(struct conncache *connc,
if(bundle->num_connections == 0) {
conncache_remove_bundle(connc, bundle);
}
connc->num_connections--;
DEBUGF(infof(conn->data, "The cache now contains %d members\n",
connc->num_connections));
if(connc) {
connc->num_connections--;
DEBUGF(infof(conn->data, "The cache now contains %d members\n",
connc->num_connections));
}
}
}