]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
A fix for a MemBuf leak caused by my recent MemBuf-related changes.
authorwessels <>
Sat, 17 Sep 2005 09:38:36 +0000 (09:38 +0000)
committerwessels <>
Sat, 17 Sep 2005 09:38:36 +0000 (09:38 +0000)
src/HttpBody.cc

index 1c8bb8ac247f73349b45035e5e000aa63d4dbbe4..baa2821afbaac7b14c9ac8a258531c3db9a1e481 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpBody.cc,v 1.21 2005/08/31 19:15:35 wessels Exp $
+ * $Id: HttpBody.cc,v 1.22 2005/09/17 03:38:36 wessels Exp $
  *
  * DEBUG: section 56    HTTP Message Body
  * AUTHOR: Alex Rousskov
@@ -49,6 +49,10 @@ httpBodyClean(HttpBody * body)
 
     if (!memBufIsNull(body->mb))
         memBufClean(body->mb);
+
+    delete body->mb;
+
+    body->mb = NULL;
 }
 
 /* set body by absorbing mb */
@@ -57,6 +61,7 @@ httpBodySet(HttpBody * body, MemBuf * mb)
 {
     assert(body);
     assert(memBufIsNull(body->mb));
+    delete body->mb;
     body->mb = mb;             /* absorb */
 }