From 6477828cdda35e85cc078ff02b70350db917f601 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Fri, 5 Aug 2005 21:16:51 +0000 Subject: [PATCH] - DeviceExtension should be NULL if the caller didn't specify any size for one. svn path=/trunk/; revision=17084 --- reactos/ntoskrnl/io/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/device.c b/reactos/ntoskrnl/io/device.c index d4fcc47a96d..ec697dd01ed 100644 --- a/reactos/ntoskrnl/io/device.c +++ b/reactos/ntoskrnl/io/device.c @@ -503,7 +503,9 @@ IoCreateDevice(PDRIVER_OBJECT DriverObject, /* Set Device Object Data */ CreatedDeviceObject->DeviceType = DeviceType; CreatedDeviceObject->Characteristics = DeviceCharacteristics; - CreatedDeviceObject->DeviceExtension = CreatedDeviceObject + 1; + CreatedDeviceObject->DeviceExtension = DeviceExtensionSize ? + CreatedDeviceObject + 1 : + NULL; CreatedDeviceObject->StackSize = 1; CreatedDeviceObject->AlignmentRequirement = 1; /* FIXME */