mirror of
https://github.com/wine-mirror/wine
synced 2024-07-05 09:18:56 +00:00
regedit: Fix memory leak on error path in RenameKey (scan-build).
parentPath is allocated before parentKey.
This commit is contained in:
parent
267ee07ded
commit
3d383c468b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user