]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix memory leak in cachemgr detected by Coverity checker.
authoramosjeffries <>
Thu, 2 Aug 2007 08:24:55 +0000 (08:24 +0000)
committeramosjeffries <>
Thu, 2 Aug 2007 08:24:55 +0000 (08:24 +0000)
tools/cachemgr.cc

index 7897bdefc09d68431b67eda383179e3f00433733..73c29761969644c349e74cab2ca1926b0d4b5b0e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cachemgr.cc,v 1.3 2006/09/10 20:08:20 serassio Exp $
+ * $Id: cachemgr.cc,v 1.4 2007/08/02 02:24:55 amosjeffries Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Duane Wessels
@@ -944,8 +944,10 @@ read_request(void)
 
     if (strlen(buf) == 0)
 #endif
-
+    {
+        free(buf);
         return NULL;
+    }
 
     req = (cachemgr_request *)xcalloc(1, sizeof(cachemgr_request));