Fix some simple memory leaks.
This commit is contained in:
parent
5ea96a851f
commit
6dc309187c
|
@ -64,7 +64,7 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
||||||
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
|
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
|
||||||
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
|
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
|
||||||
MSIVIEW *tv = NULL;
|
MSIVIEW *tv = NULL;
|
||||||
MSIRECORD *rec;
|
MSIRECORD *rec = NULL;
|
||||||
|
|
||||||
TRACE("%p Table %s (%s)\n", cv, debugstr_w(cv->name),
|
TRACE("%p Table %s (%s)\n", cv, debugstr_w(cv->name),
|
||||||
cv->bIsTemp?"temporary":"permanent");
|
cv->bIsTemp?"temporary":"permanent");
|
||||||
|
@ -148,6 +148,8 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
||||||
r = ERROR_SUCCESS;
|
r = ERROR_SUCCESS;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
if (rec)
|
||||||
|
msiobj_release( &rec->hdr );
|
||||||
/* FIXME: remove values from the string table on error */
|
/* FIXME: remove values from the string table on error */
|
||||||
if( tv )
|
if( tv )
|
||||||
tv->ops->delete( tv );
|
tv->ops->delete( tv );
|
||||||
|
|
|
@ -1524,6 +1524,7 @@ static UINT msi_dialog_set_property( msi_dialog *dialog, LPCWSTR event, LPCWSTR
|
||||||
if( strcmpW( szNullArg, arg ) )
|
if( strcmpW( szNullArg, arg ) )
|
||||||
deformat_string( dialog->package, arg, &arg_fmt );
|
deformat_string( dialog->package, arg, &arg_fmt );
|
||||||
MSI_SetPropertyW( dialog->package, prop, arg_fmt );
|
MSI_SetPropertyW( dialog->package, prop, arg_fmt );
|
||||||
|
msi_free( arg_fmt );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ERR("Badly formatted property string - what happens?\n");
|
ERR("Badly formatted property string - what happens?\n");
|
||||||
|
|
|
@ -368,6 +368,7 @@ static LPWSTR deformat_group(MSIPACKAGE* package, LPWSTR group, DWORD len,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
msi_free(value);
|
||||||
*size = 0;
|
*size = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -423,6 +424,7 @@ static DWORD deformat_string_internal(MSIPACKAGE *package, LPCWSTR ptr,
|
||||||
{
|
{
|
||||||
value = deformat_group(package, key, strlenW(key)+1, record,
|
value = deformat_group(package, key, strlenW(key)+1, record,
|
||||||
&chunk);
|
&chunk);
|
||||||
|
msi_free( key );
|
||||||
key = NULL;
|
key = NULL;
|
||||||
nested = FALSE;
|
nested = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -488,6 +488,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
|
||||||
msi_free( folder->ResolvedTarget );
|
msi_free( folder->ResolvedTarget );
|
||||||
msi_free( folder->ResolvedSource );
|
msi_free( folder->ResolvedSource );
|
||||||
msi_free( folder->Property );
|
msi_free( folder->Property );
|
||||||
|
msi_free( folder );
|
||||||
}
|
}
|
||||||
|
|
||||||
LIST_FOR_EACH_SAFE( item, cursor, &package->components )
|
LIST_FOR_EACH_SAFE( item, cursor, &package->components )
|
||||||
|
|
Loading…
Reference in New Issue