From: Francesco Chemolli Date: Thu, 8 Dec 2011 22:07:47 +0000 (+0100) Subject: MemBufs don't need explicit cleanup anymore in HttpBody X-Git-Tag: BumpSslServerFirst.take05~12^2~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6797fcb1d33e823a7336d50fdb529820aa4d2a84;p=thirdparty%2Fsquid.git MemBufs don't need explicit cleanup anymore in HttpBody --- diff --git a/src/HttpBody.cc b/src/HttpBody.cc index 6cef876ac4..110d282d56 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -43,22 +43,19 @@ HttpBody::HttpBody() : mb(new MemBuf) HttpBody::~HttpBody() { - clear(); delete mb; } void HttpBody::clear() { - if (!mb->isNull()) - mb->clean(); + mb->clean(); } /* set body by absorbing mb */ void HttpBody::setMb(MemBuf * mb_) { - clear(); delete mb; /* note: protection against assign-to-self is not needed * as MemBuf doesn't have a copy-constructor. If such a constructor