From: hno <> Date: Tue, 2 Apr 2002 04:53:21 +0000 (+0000) Subject: store...WriteCleanEntry had a bug where it referenced already freed X-Git-Tag: SQUID_3_0_PRE1~1140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82c308b488d5299e630286ec0d010565d7f409de;p=thirdparty%2Fsquid.git store...WriteCleanEntry had a bug where it referenced already freed memory in case of a write failure (found by Guido) --- diff --git a/src/fs/aufs/store_dir_aufs.cc b/src/fs/aufs/store_dir_aufs.cc index 48798ed7e5..4c2db315a7 100644 --- a/src/fs/aufs/store_dir_aufs.cc +++ b/src/fs/aufs/store_dir_aufs.cc @@ -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; } diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 39549e831a..b1de0502a7 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -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; } diff --git a/src/fs/diskd/store_dir_diskd.cc b/src/fs/diskd/store_dir_diskd.cc index 5beb4eb438..a5ff2178e9 100644 --- a/src/fs/diskd/store_dir_diskd.cc +++ b/src/fs/diskd/store_dir_diskd.cc @@ -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; } diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index b387f7339d..6adb655533 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -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; }