Commit 3d383c46 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

regedit: Fix memory leak on error path in RenameKey (scan-build).

parentPath is allocated before parentKey.
parent 267ee07d
...@@ -680,9 +680,7 @@ BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName) ...@@ -680,9 +680,7 @@ BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName)
done: done:
RegCloseKey(destKey); RegCloseKey(destKey);
if (parentKey) { RegCloseKey(parentKey);
RegCloseKey(parentKey); free(parentPath);
free(parentPath);
}
return result; return result;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment