Allocate memory even for NULL strings, as we must not return a NULL pointer

svn path=/trunk/; revision=18310
This commit is contained in:
Hervé Poussineau 2005-10-07 15:47:17 +00:00
parent 10e6548a78
commit c2199941a3

View file

@ -107,8 +107,11 @@ PdoQueryId(
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);