mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 16:07:20 +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:
|
done:
|
||||||
RegCloseKey(destKey);
|
RegCloseKey(destKey);
|
||||||
if (parentKey) {
|
|
||||||
RegCloseKey(parentKey);
|
RegCloseKey(parentKey);
|
||||||
free(parentPath);
|
free(parentPath);
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue