]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
memory leak fix
authorwessels <>
Wed, 25 Sep 1996 00:48:12 +0000 (00:48 +0000)
committerwessels <>
Wed, 25 Sep 1996 00:48:12 +0000 (00:48 +0000)
src/net_db.cc

index 89147e894cd8230a27c71c648b6ebde828e322a1..c070dc70d595b3cdca5ca81275d5a637d1692620 100644 (file)
@@ -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);