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,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