Commit 470f23d4 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix various memory leaks.

parent 994382b2
...@@ -3967,6 +3967,7 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param) ...@@ -3967,6 +3967,7 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
output = msi_alloc(sz); output = msi_alloc(sz);
memset(output,0,sz); memset(output,0,sz);
strcpyW(output,advertise); strcpyW(output,advertise);
msi_free(advertise);
if (text) if (text)
strcatW(output,text); strcatW(output,text);
......
...@@ -182,6 +182,7 @@ term: ...@@ -182,6 +182,7 @@ term:
| value_s | value_s
{ {
$$ = ($1 && $1[0]) ? MSICONDITION_TRUE : MSICONDITION_FALSE; $$ = ($1 && $1[0]) ? MSICONDITION_TRUE : MSICONDITION_FALSE;
msi_free( $1 );
} }
| value_i comp_op_i value_i | value_i comp_op_i value_i
{ {
...@@ -190,18 +191,24 @@ term: ...@@ -190,18 +191,24 @@ term:
| value_s comp_op_s value_s | value_s comp_op_s value_s
{ {
$$ = $2( $1, $3, FALSE ); $$ = $2( $1, $3, FALSE );
msi_free( $1 );
msi_free( $3 );
} }
| value_s COND_TILDA comp_op_s value_s | value_s COND_TILDA comp_op_s value_s
{ {
$$ = $3( $1, $4, TRUE ); $$ = $3( $1, $4, TRUE );
msi_free( $1 );
msi_free( $4 );
} }
| value_s comp_op_m1 value_i | value_s comp_op_m1 value_i
{ {
$$ = $2( $1, $3 ); $$ = $2( $1, $3 );
msi_free( $1 );
} }
| value_i comp_op_m2 value_s | value_i comp_op_m2 value_s
{ {
$$ = $2( $1, $3 ); $$ = $2( $1, $3 );
msi_free( $3 );
} }
| COND_LPAR expression COND_RPAR | COND_LPAR expression COND_RPAR
{ {
......
...@@ -193,7 +193,10 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute) ...@@ -193,7 +193,10 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute)
} }
} }
else if (!check_execution_scheduling_options(package,action,type)) else if (!check_execution_scheduling_options(package,action,type))
{
msiobj_release(&row->hdr);
return ERROR_SUCCESS; return ERROR_SUCCESS;
}
switch (type & CUSTOM_ACTION_TYPE_MASK) switch (type & CUSTOM_ACTION_TYPE_MASK)
{ {
......
...@@ -214,18 +214,17 @@ static INT_PTR cabinet_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) ...@@ -214,18 +214,17 @@ static INT_PTR cabinet_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
given_file = strdupAtoW(pfdin->psz1); given_file = strdupAtoW(pfdin->psz1);
f = get_loaded_file(data->package, given_file); f = get_loaded_file(data->package, given_file);
msi_free(given_file);
if (!f) if (!f)
{ {
ERR("Unknown File in Cabinent (%s)\n",debugstr_w(given_file)); ERR("Unknown File in Cabinet (%s)\n",debugstr_a(pfdin->psz1));
msi_free(given_file);
return 0; return 0;
} }
if (!((f->State == 1 || f->State == 2))) if (!((f->State == 1 || f->State == 2)))
{ {
TRACE("Skipping extraction of %s\n",debugstr_w(given_file)); TRACE("Skipping extraction of %s\n",debugstr_a(pfdin->psz1));
msi_free(given_file);
return 0; return 0;
} }
......
...@@ -599,6 +599,8 @@ void ACTION_free_package_structures( MSIPACKAGE* package) ...@@ -599,6 +599,8 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
msi_free(package->PackagePath); msi_free(package->PackagePath);
msi_free(package->msiFilePath); msi_free(package->msiFilePath);
msi_free(package->ProductCode); msi_free(package->ProductCode);
msi_free(package->ActionFormat);
msi_free(package->LastAction);
/* cleanup control event subscriptions */ /* cleanup control event subscriptions */
ControlEvent_CleanupSubscriptions(package); ControlEvent_CleanupSubscriptions(package);
......
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