diff --git a/reactos/dll/win32/setupapi/devinst.c b/reactos/dll/win32/setupapi/devinst.c index 93934e726d7..d4160b2936d 100644 --- a/reactos/dll/win32/setupapi/devinst.c +++ b/reactos/dll/win32/setupapi/devinst.c @@ -5777,6 +5777,8 @@ cleanup: RegCloseKey(hEnumKey); if (hKey != NULL && hKey != key) RegCloseKey(hKey); + if (DriverKey) + HeapFree(GetProcessHeap(), 0, DriverKey); return key; }