Commit 41a04cc0 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix memory leaks.

parent 72faac0d
......@@ -236,8 +236,11 @@ static UINT ControlEvent_SetTargetPath(MSIPACKAGE* package, LPCWSTR argument,
msi_dialog* dialog)
{
LPWSTR path = load_dynamic_property(package,argument, NULL);
UINT r;
/* failure to set the path halts the executing of control events */
return MSI_SetTargetPathW(package, argument, path);
r = MSI_SetTargetPathW(package, argument, path);
HeapFree(GetProcessHeap(),0,path);
return r;
}
/*
......
......@@ -276,6 +276,7 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
path = build_directory_name(2, check_path, NULL);
if (strcmpiW(path,check_path)!=0)
MSI_SetPropertyW(package,cszTargetDir,path);
HeapFree(GetProcessHeap(),0,check_path);
}
else
{
......
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