From: wessels <> Date: Tue, 22 Nov 2005 05:54:00 +0000 (+0000) Subject: In the MemBuf destructor, call clean() if necessary and don't worry so X-Git-Tag: SQUID_3_0_PRE4~517 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11ef79a6eef6e2dd1e971191afde910fb5e411ee;p=thirdparty%2Fsquid.git In the MemBuf destructor, call clean() if necessary and don't worry so much about making sure the MemBuf user cleans it. --- diff --git a/src/MemBuf.cci b/src/MemBuf.cci index 8f81408bdc..30a38f6514 100644 --- a/src/MemBuf.cci +++ b/src/MemBuf.cci @@ -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(); }