From: wessels <> Date: Sat, 17 Sep 2005 09:38:36 +0000 (+0000) Subject: A fix for a MemBuf leak caused by my recent MemBuf-related changes. X-Git-Tag: SQUID_3_0_PRE4~612 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57616049cd36a453df817795062945bb682cf276;p=thirdparty%2Fsquid.git A fix for a MemBuf leak caused by my recent MemBuf-related changes. --- diff --git a/src/HttpBody.cc b/src/HttpBody.cc index 1c8bb8ac24..baa2821afb 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpBody.cc,v 1.21 2005/08/31 19:15:35 wessels Exp $ + * $Id: HttpBody.cc,v 1.22 2005/09/17 03:38:36 wessels Exp $ * * DEBUG: section 56 HTTP Message Body * AUTHOR: Alex Rousskov @@ -49,6 +49,10 @@ httpBodyClean(HttpBody * body) if (!memBufIsNull(body->mb)) memBufClean(body->mb); + + delete body->mb; + + body->mb = NULL; } /* set body by absorbing mb */ @@ -57,6 +61,7 @@ httpBodySet(HttpBody * body, MemBuf * mb) { assert(body); assert(memBufIsNull(body->mb)); + delete body->mb; body->mb = mb; /* absorb */ }