Allocate memory even for NULL strings, as we must not return a NULL pointer
Modified: trunk/reactos/drivers/bus/pci/pdo.c

Modified: trunk/reactos/drivers/bus/pci/pdo.c
--- trunk/reactos/drivers/bus/pci/pdo.c	2005-10-07 13:09:23 UTC (rev 18309)
+++ trunk/reactos/drivers/bus/pci/pdo.c	2005-10-07 15:47:17 UTC (rev 18310)
@@ -107,8 +107,11 @@
       break;
 
     case BusQueryInstanceID:
+      /* FIXME: RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING flag
+       * needs to be removed once PciCreateInstanceIDString is fixed
+       */
       Status = RtlDuplicateUnicodeString(
-        RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
+        RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE | RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING,
         &DeviceExtension->InstanceID,
         &String);