[SETUPAPI]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 17 May 2015 10:09:50 +0000 (10:09 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 17 May 2015 10:09:50 +0000 (10:09 +0000)
Fix a memory leak

svn path=/trunk/; revision=67804

reactos/dll/win32/setupapi/interface.c

index deaadd9..89e3d8d 100644 (file)
@@ -586,6 +586,7 @@ SetupDiOpenDeviceInterfaceRegKey(
         Slash = wcsrchr(Path, '\\');
         if (!Guid || !Slash)
         {
+            HeapFree(GetProcessHeap(), 0, Path);
             SetLastError(ERROR_INVALID_PARAMETER);
             return INVALID_HANDLE_VALUE;
         }