From: Marc Hoersken Date: Sat, 4 Jan 2014 15:34:58 +0000 (+0100) Subject: conncache.c: fix possible dereference of null pointer X-Git-Tag: curl-7_35_0~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fc4abedf12b8f1f2db2e860180194750f36a296;p=curl conncache.c: fix possible dereference of null pointer --- diff --git a/lib/conncache.c b/lib/conncache.c index 48271f751..391d44fe4 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -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)); + } } }