From: adrian <> Date: Thu, 12 Feb 2004 09:31:55 +0000 (+0000) Subject: Free the generic cbdata mempool allocation if we fail the storeOpen() - X-Git-Tag: SQUID_3_0_PRE4~1140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad8f212f1ac5e05a900bc53fbc4cf13e24123084;p=thirdparty%2Fsquid.git Free the generic cbdata mempool allocation if we fail the storeOpen() - if we fail on open any subsequent calls to storeSwapOut() will simply return immediately and so this memory is never freed. --- diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 0b19b8c889..10ec9be9bf 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.97 2003/09/06 12:59:04 robertc Exp $ + * $Id: store_swapout.cc,v 1.98 2004/02/12 02:31:55 adrian Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -68,6 +68,7 @@ storeSwapOutStart(StoreEntry * e) if (NULL == sio.getRaw()) { e->swap_status = SWAPOUT_NONE; + cbdataFree(c); storeLog(STORE_LOG_SWAPOUTFAIL, e); return; }