check for failure of vfatAttachFCBToFileObject() during file creation
Modified: trunk/reactos/drivers/fs/vfat/create.c
_____
Modified: trunk/reactos/drivers/fs/vfat/create.c
--- trunk/reactos/drivers/fs/vfat/create.c 2005-08-12 16:47:29 UTC
(rev 17327)
+++ trunk/reactos/drivers/fs/vfat/create.c 2005-08-12 16:49:04 UTC
(rev 17328)
@@ -564,7 +564,12 @@
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;