Skip to content
Snippets Groups Projects
Commit 3d383c46 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard
Browse files

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

parentPath is allocated before parentKey.
parent 267ee07d
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment