Alban Browaeys : msi: Move msi_free(msiFilePath)
to enable ERR message to use it before it is freed.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 16 07:08:48 CDT 2007
Module: wine
Branch: master
Commit: 7aa39178235d713696f17341a9e7c55f317022cc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7aa39178235d713696f17341a9e7c55f317022cc
Author: Alban Browaeys <prahal at yahoo.com>
Date: Sun Apr 15 12:11:38 2007 +0200
msi: Move msi_free(msiFilePath) to enable ERR message to use it before it is freed.
---
dlls/msi/action.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index f047a27..c3e65d2 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3679,14 +3679,15 @@ static UINT msi_make_package_local( MSIPACKAGE *package, HKEY hkey )
msiFilePath = msi_dup_property( package, szOriginalDatabase );
r = CopyFileW( msiFilePath, packagefile, FALSE);
- msi_free( msiFilePath );
if (!r)
{
ERR("Unable to copy package (%s -> %s) (error %d)\n",
debugstr_w(msiFilePath), debugstr_w(packagefile), GetLastError());
+ msi_free( msiFilePath );
return ERROR_FUNCTION_FAILED;
}
+ msi_free( msiFilePath );
/* FIXME: maybe set this key in ACTION_RegisterProduct instead */
msi_reg_set_val_str( hkey, INSTALLPROPERTY_LOCALPACKAGEW, packagefile );
More information about the wine-cvs
mailing list