[SETUPAPI]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 09:54:54 +0000 (09:54 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 09:54:54 +0000 (09:54 +0000)
Fix a memory leak

CID 1250296

svn path=/trunk/; revision=69669

reactos/dll/win32/setupapi/devclass.c

index a8a9b66..1e2a734 100644 (file)
@@ -552,6 +552,9 @@ cleanup:
     if (hKey != INVALID_HANDLE_VALUE)
         RegCloseKey(hKey);
 
+    if (Buffer && !ret)
+        MyFree(Buffer);
+
     return ret;
 }