]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Free the generic cbdata mempool allocation if we fail the storeOpen() -
authoradrian <>
Thu, 12 Feb 2004 09:31:55 +0000 (09:31 +0000)
committeradrian <>
Thu, 12 Feb 2004 09:31:55 +0000 (09:31 +0000)
if we fail on open any subsequent calls to storeSwapOut() will simply
return immediately and so this memory is never freed.

src/store_swapout.cc

index 0b19b8c889f1cf5dce73e91492120b4bc4a643cd..10ec9be9bf6a120ab8bba55926518ed6a52f509d 100644 (file)
@@ -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;
     }