]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
set e->mem_obj = NULL in the right place, destroy_MemObject()
authorwessels <>
Mon, 17 Aug 1998 22:50:39 +0000 (22:50 +0000)
committerwessels <>
Mon, 17 Aug 1998 22:50:39 +0000 (22:50 +0000)
src/store.cc

index 7509cc01ec239d4525adc7d5f128e48dd95fbf94..fe0aecb74b86e0232dda563e4adb838f8ab0bdba 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.440 1998/08/14 23:52:18 wessels Exp $
+ * $Id: store.cc,v 1.441 1998/08/17 16:50:39 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -132,6 +132,7 @@ destroy_MemObject(StoreEntry * e)
     MemObject *mem = e->mem_obj;
     const Ctx ctx = ctx_enter(mem->url);
     debug(20, 3) ("destroy_MemObject: destroying %p\n", mem);
+    e->mem_obj = NULL;
     assert(mem->swapout.fd == -1);
     stmemFree(&mem->data_hdr);
     mem->inmem_hi = 0;
@@ -205,7 +206,6 @@ storePurgeMem(StoreEntry * e)
        storeKeyText(e->key));
     storeSetMemStatus(e, NOT_IN_MEMORY);
     destroy_MemObject(e);
-    e->mem_obj = NULL;
     if (e->swap_status != SWAPOUT_DONE)
        storeRelease(e);
 }