https://git.reactos.org/?p=reactos.git;a=commitdiff;h=da1f4ed6af0e12669c05b…
commit da1f4ed6af0e12669c05b1335b4e23af46946565
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Tue Dec 8 01:32:15 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Tue Dec 8 01:32:15 2020 +0300
[SCSIPORT] Fix setting the "Driver" field in the DeviceMap\Scsi registry
key
---
drivers/storage/port/scsiport/registry.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/storage/port/scsiport/registry.c
b/drivers/storage/port/scsiport/registry.c
index 3b9e235d752..24b197a81ef 100644
--- a/drivers/storage/port/scsiport/registry.c
+++ b/drivers/storage/port/scsiport/registry.c
@@ -212,13 +212,16 @@ RegistryInitAdapterKey(
}
/* Set 'Driver' (REG_SZ) value */
- PUNICODE_STRING driverNameU =
&DeviceExtension->Common.DeviceObject->DriverObject->DriverName;
+ PUNICODE_STRING driverNameU =
&DeviceExtension->Common.DeviceObject->DriverObject
+ ->DriverExtension->ServiceKeyName;
+
PWCHAR driverName = ExAllocatePoolWithTag(PagedPool,
driverNameU->Length +
sizeof(UNICODE_NULL),
TAG_SCSIPORT);
if (!driverName)
{
DPRINT("Failed to allocate driverName!\n");
+ ZwClose(ScsiPortKey);
return STATUS_INSUFFICIENT_RESOURCES;
}