Fix a memory leak in MsiConfigureProductExW.

This commit is contained in:
Mike McCormack 2005-02-09 13:22:49 +00:00 committed by Alexandre Julliard
parent c3b8a80f45
commit 17cfa28216
1 changed files with 4 additions and 2 deletions

View File

@ -476,7 +476,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
* ok 1, we need to find the msi file for this product. * ok 1, we need to find the msi file for this product.
* 2, find the source dir for the files * 2, find the source dir for the files
* 3, do the configure/install. * 3, do the configure/install.
4, cleanupany runonce entry. * 4, cleanupany runonce entry.
*/ */
rc = MsiOpenProductW(szProduct,&handle); rc = MsiOpenProductW(szProduct,&handle);
@ -485,7 +485,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE); package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
sz = strlenW(szInstalled); sz = strlenW(szInstalled);
if (szCommandLine) if (szCommandLine)
sz += strlenW(szCommandLine); sz += strlenW(szCommandLine);
@ -502,6 +502,8 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
rc = ACTION_DoTopLevelINSTALL(package, sourcepath, commandline); rc = ACTION_DoTopLevelINSTALL(package, sourcepath, commandline);
msiobj_release( &package->hdr );
HeapFree(GetProcessHeap(),0,commandline); HeapFree(GetProcessHeap(),0,commandline);
end: end:
RegCloseKey(hkey); RegCloseKey(hkey);