From 5d8ab9ff701fe2a4d314a908afcfd1407af39924 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Thu, 2 Jan 2003 16:01:21 +0000 Subject: [PATCH] Uninitialize the file cache only if it was initialized. svn path=/trunk/; revision=3914 --- reactos/drivers/fs/cdfs/cleanup.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/fs/cdfs/cleanup.c b/reactos/drivers/fs/cdfs/cleanup.c index 3a23a0c8b74..88ea462be05 100644 --- a/reactos/drivers/fs/cdfs/cleanup.c +++ b/reactos/drivers/fs/cdfs/cleanup.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: cleanup.c,v 1.1 2002/09/09 17:27:14 hbirr Exp $ +/* $Id: cleanup.c,v 1.2 2003/01/02 16:01:21 hbirr Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -58,8 +58,11 @@ CdfsCleanupFile(PDEVICE_EXTENSION DeviceExt, return STATUS_SUCCESS; } - /* Uninitialize the file cache. */ - CcRosReleaseFileCache (FileObject, Ccb->Fcb->RFCB.Bcb); + /* Uninitialize file cache if initialized for this file object. */ + if (Ccb->Fcb->RFCB.Bcb != NULL) + { + CcRosReleaseFileCache (FileObject, Ccb->Fcb->RFCB.Bcb); + } return STATUS_SUCCESS; }