]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
In the MemBuf destructor, call clean() if necessary and don't worry so
authorwessels <>
Tue, 22 Nov 2005 05:54:00 +0000 (05:54 +0000)
committerwessels <>
Tue, 22 Nov 2005 05:54:00 +0000 (05:54 +0000)
much about making sure the MemBuf user cleans it.

src/MemBuf.cci

index 8f81408bdc921d871a564fe79aecb850797ec0e3..30a38f6514c5e9bcb00cff85b84914cb3f0a821d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: MemBuf.cci,v 1.2 2005/08/31 19:15:35 wessels Exp $
+ * $Id: MemBuf.cci,v 1.3 2005/11/21 22:54:00 wessels Exp $
  *
  * DEBUG: section 59    auto-growing Memory Buffer with printf
  * AUTHOR: Robert Collins
@@ -38,6 +38,6 @@ MemBuf::MemBuf() : buf (NULL), size (0), max_capacity (0), capacity(0), stolen(0
 
 MemBuf::~MemBuf()
 {
-    if (!stolen)
-        assert(NULL == buf);
+    if (!stolen && buf)
+        clean();
 }