From c2199941a3dcc64bcc74a6f1b46cf286c72dba2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 7 Oct 2005 15:47:17 +0000 Subject: [PATCH] Allocate memory even for NULL strings, as we must not return a NULL pointer svn path=/trunk/; revision=18310 --- reactos/drivers/bus/pci/pdo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/bus/pci/pdo.c b/reactos/drivers/bus/pci/pdo.c index 52128eadd4d..a56ddb781d1 100644 --- a/reactos/drivers/bus/pci/pdo.c +++ b/reactos/drivers/bus/pci/pdo.c @@ -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);