]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
MemBufs don't need explicit cleanup anymore in HttpBody
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 8 Dec 2011 22:07:47 +0000 (23:07 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 8 Dec 2011 22:07:47 +0000 (23:07 +0100)
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