From: Francesco Chemolli Date: Mon, 12 Dec 2011 10:35:42 +0000 (-0700) Subject: Cleanup: MemBufs don't need explicit cleanup anymore in HttpBody X-Git-Tag: SQUID_3_2_0_14~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=916aa7b1536b8828aee336016dc58fb0e4336759;p=thirdparty%2Fsquid.git Cleanup: 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