Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/hidclass.sys/pnp.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index 5db9c476a2..1c130e8dd8 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -123,6 +123,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO) { ERR("Minidriver AddDevice failed (%x)\n",status); HID_DeleteDevice(device); + HeapFree(GetProcessHeap(), 0, hiddev); return status; }
@@ -133,6 +134,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO) { ERR("Minidriver failed to get Attributes(%x)\n",status); HID_DeleteDevice(device); + HeapFree(GetProcessHeap(), 0, hiddev); return status; }
@@ -147,6 +149,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO) { ERR("Cannot get Device Descriptor(%x)\n",status); HID_DeleteDevice(device); + HeapFree(GetProcessHeap(), 0, hiddev); return status; } for (i = 0; i < descriptor.bNumDescriptors; i++) @@ -157,6 +160,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO) { ERR("No Report Descriptor found in reply\n"); HID_DeleteDevice(device); + HeapFree(GetProcessHeap(), 0, hiddev); return status; }
@@ -168,6 +172,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO) ERR("Cannot get Report Descriptor(%x)\n",status); HID_DeleteDevice(device); HeapFree(GetProcessHeap(), 0, reportDescriptor); + HeapFree(GetProcessHeap(), 0, hiddev); return status; }
@@ -178,6 +183,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO) { ERR("Cannot parse Report Descriptor\n"); HID_DeleteDevice(device); + HeapFree(GetProcessHeap(), 0, hiddev); return STATUS_NOT_SUPPORTED; }