1
0
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:
Alex Henrie 2023-06-18 22:32:00 -06:00 committed by Alexandre Julliard
parent 267ee07ded
commit 3d383c468b

View File

@ -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;
}