[NTOSKNRL] Only allocate a MDL if we have an output length
[reactos.git] / ntoskrnl / io / iomgr / iofunc.c
index fa48869..d119f85 100644 (file)
@@ -580,7 +580,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
                 }
 
                 /* Check if we got an output buffer */
-                if (OutputBuffer)
+                if (OutputBufferLength)
                 {
                     /* Allocate the System Buffer */
                     Irp->MdlAddress = IoAllocateMdl(OutputBuffer,