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)
done:
RegCloseKey(destKey);
if (parentKey) {
RegCloseKey(parentKey);
free(parentPath);
}
RegCloseKey(parentKey);
free(parentPath);
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