[NTOSKRNL] Properly initialize the IO_STATUS_BLOCK
[reactos.git] / ntoskrnl / fsrtl / fastio.c
index d3ea273..c9ff2f0 100644 (file)
@@ -310,11 +310,13 @@ FsRtlCopyWrite(IN PFILE_OBJECT FileObject,
         return FALSE;
     }
 
+    /* Already init IO_STATUS_BLOCK */
+    IoStatus->Status = STATUS_SUCCESS;
+    IoStatus->Information = Length;
+
     /* No actual read */
     if (!Length)
     {
-        IoStatus->Status = STATUS_SUCCESS;
-        IoStatus->Information = Length;
         return TRUE;
     }