From: wessels <> Date: Wed, 25 Sep 1996 00:48:12 +0000 (+0000) Subject: memory leak fix X-Git-Tag: SQUID_3_0_PRE1~5736 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb190ed77515650cb7d41d50fb7d9a4cec14ad7a;p=thirdparty%2Fsquid.git memory leak fix --- diff --git a/src/net_db.cc b/src/net_db.cc index 89147e894c..c070dc70d5 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -97,8 +97,10 @@ netdbSendPing(int fdunused, struct hostent *hp, void *data) struct in_addr addr; char *hostname = data; netdbEntry *n; - if (hp == NULL) + if (hp == NULL) { + xfree(hostname); return; + } addr = inaddrFromHostent(hp); if ((n = netdbLookupHost(hostname)) == NULL) n = netdbAdd(addr, hostname);