- Free the string buffer after the DPRINT1 that prints the contents of the string
- Fixes debug print corruption found by kmtest
svn path=/trunk/; revision=47307
0,
(PVOID*)&DriverObject);
- /*
- * Free the buffer for driver object name
- */
- ExFreePool(ObjectName.Buffer);
-
if (!NT_SUCCESS(Status))
{
DPRINT1("Can't locate driver object for %wZ\n", &ObjectName);
+ ExFreePool(ObjectName.Buffer);
return Status;
}
+ /*
+ * Free the buffer for driver object name
+ */
+ ExFreePool(ObjectName.Buffer);
+
/* Check that driver is not already unloading */
if (DriverObject->Flags & DRVO_UNLOAD_INVOKED)
{