From 32ca0b027435b048a4c71e225687c63e90fe1fbe Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Fri, 12 Aug 2005 16:49:04 +0000 Subject: [PATCH] check for failure of vfatAttachFCBToFileObject() during file creation svn path=/trunk/; revision=17328 --- reactos/drivers/fs/vfat/create.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/fs/vfat/create.c b/reactos/drivers/fs/vfat/create.c index 800a66aecbd..41ef6f26f93 100644 --- a/reactos/drivers/fs/vfat/create.c +++ b/reactos/drivers/fs/vfat/create.c @@ -564,7 +564,12 @@ VfatCreateFile (PDEVICE_OBJECT DeviceObject, PIRP Irp) vfatReleaseFCB (DeviceExt, ParentFcb); if (NT_SUCCESS (Status)) { - vfatAttachFCBToFileObject (DeviceExt, pFcb, FileObject); + Status = vfatAttachFCBToFileObject (DeviceExt, pFcb, FileObject); + if ( !NT_SUCCESS(Status) ) + { + vfatReleaseFCB (DeviceExt, pFcb); + return Status; + } Irp->IoStatus.Information = FILE_CREATED;