From: phk Date: Wed, 19 Jul 2006 19:47:29 +0000 (+0000) Subject: Don't panic on NULL srcaddr, but revisit later when we know the X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b3af6a4cd8705c56b4542fec747d35cf60bf565;p=varnish Don't panic on NULL srcaddr, but revisit later when we know the details. Is it the Prefetcher ? git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@504 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_session.c b/varnish-cache/bin/varnishd/cache_session.c index 6b9b4a98..b0a5555c 100644 --- a/varnish-cache/bin/varnishd/cache_session.c +++ b/varnish-cache/bin/varnishd/cache_session.c @@ -135,6 +135,11 @@ void SES_RelSrcAddr(struct sess *sp) { + if (sp->srcaddr == NULL) { + /* XXX who comes this way ? */ + VSL(SLT_Debug, sp->fd, "had no srcaddr"); + return; + } assert(sp->srcaddr != NULL); AZ(pthread_mutex_lock(&ses_mtx)); sp->srcaddr->nsess--;