]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
store...WriteCleanEntry had a bug where it referenced already freed
authorhno <>
Tue, 2 Apr 2002 04:53:21 +0000 (04:53 +0000)
committerhno <>
Tue, 2 Apr 2002 04:53:21 +0000 (04:53 +0000)
memory in case of a write failure (found by Guido)

src/fs/aufs/store_dir_aufs.cc
src/fs/coss/store_dir_coss.cc
src/fs/diskd/store_dir_diskd.cc
src/fs/ufs/store_dir_ufs.cc

index 48798ed7e5c3625d578432697fb3407b784783a3..4c2db315a7be17cca2c25f5e08b84f70dc12b29d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_aufs.cc,v 1.41 2002/02/19 00:50:01 hno Exp $
+ * $Id: store_dir_aufs.cc,v 1.42 2002/04/01 21:53:21 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1028,6 +1028,7 @@ storeAufsDirWriteCleanEntry(SwapDir * sd, const StoreEntry * e)
            safe_free(state);
            sd->log.clean.state = NULL;
            sd->log.clean.write = NULL;
+           return;
        }
        state->outbuf_offset = 0;
     }
index 39549e831aeecfe3b59a9ed3022387ebad17bc40..b1de0502a767d156ec31217fb9806ef165305b8e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_coss.cc,v 1.30 2001/11/13 18:11:20 hno Exp $
+ * $Id: store_dir_coss.cc,v 1.31 2002/04/01 21:53:21 hno Exp $
  *
  * DEBUG: section 81    Store COSS Directory Routines
  * AUTHOR: Eric Stern
@@ -556,6 +556,7 @@ storeCossDirWriteCleanEntry(SwapDir * sd, const StoreEntry * e)
            safe_free(state);
            sd->log.clean.state = NULL;
            sd->log.clean.write = NULL;
+           return;
        }
        state->outbuf_offset = 0;
     }
index 5beb4eb4384a9d4240f5644d0bd55e93a0bb0f3c..a5ff2178e9b1d27625943d3643c94a6cbc5e70e2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_diskd.cc,v 1.59 2002/02/19 00:50:01 hno Exp $
+ * $Id: store_dir_diskd.cc,v 1.60 2002/04/01 21:53:21 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1217,6 +1217,7 @@ storeDiskdDirWriteCleanEntry(SwapDir * sd, const StoreEntry * e)
            safe_free(state);
            sd->log.clean.state = NULL;
            sd->log.clean.write = NULL;
+           return;
        }
        state->outbuf_offset = 0;
     }
index b387f7339d3f8a4538367469be82c5dda3b0e643..6adb6555337afab4933707bda3466a7b95a85487 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.40 2002/02/19 00:50:01 hno Exp $
+ * $Id: store_dir_ufs.cc,v 1.41 2002/04/01 21:53:22 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1026,6 +1026,7 @@ storeUfsDirWriteCleanEntry(SwapDir * sd, const StoreEntry * e)
            safe_free(state);
            sd->log.clean.state = NULL;
            sd->log.clean.write = NULL;
+           return;
        }
        state->outbuf_offset = 0;
     }