Fix memory leaks.

oldstable
Mike McCormack 2005-09-08 11:03:45 +00:00 committed by Alexandre Julliard
parent 72faac0d2f
commit 41a04cc0de
2 changed files with 5 additions and 1 deletions

View File

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

View File

@ -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
{