]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: MemBufs don't need explicit cleanup anymore in HttpBody
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 12 Dec 2011 10:35:42 +0000 (03:35 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 12 Dec 2011 10:35:42 +0000 (03:35 -0700)
src/HttpBody.cc

index 6cef876ac4d88aaf41729b586b034991b42289e7..110d282d56f7209b391bba18fac9ce80f20f747d 100644 (file)
@@ -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