Commit 6dc30918 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix some simple memory leaks.

parent 5ea96a85
......@@ -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 szColumns[] = { '_','C','o','l','u','m','n','s',0 };
MSIVIEW *tv = NULL;
MSIRECORD *rec;
MSIRECORD *rec = NULL;
TRACE("%p Table %s (%s)\n", cv, debugstr_w(cv->name),
cv->bIsTemp?"temporary":"permanent");
......@@ -148,6 +148,8 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
r = ERROR_SUCCESS;
err:
if (rec)
msiobj_release( &rec->hdr );
/* FIXME: remove values from the string table on error */
if( 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 ) )
deformat_string( dialog->package, arg, &arg_fmt );
MSI_SetPropertyW( dialog->package, prop, arg_fmt );
msi_free( arg_fmt );
}
else
ERR("Badly formatted property string - what happens?\n");
......
......@@ -368,6 +368,7 @@ static LPWSTR deformat_group(MSIPACKAGE* package, LPWSTR group, DWORD len,
}
else
{
msi_free(value);
*size = 0;
return NULL;
}
......@@ -423,6 +424,7 @@ static DWORD deformat_string_internal(MSIPACKAGE *package, LPCWSTR ptr,
{
value = deformat_group(package, key, strlenW(key)+1, record,
&chunk);
msi_free( key );
key = NULL;
nested = FALSE;
}
......
......@@ -488,6 +488,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
msi_free( folder->ResolvedTarget );
msi_free( folder->ResolvedSource );
msi_free( folder->Property );
msi_free( folder );
}
LIST_FOR_EACH_SAFE( item, cursor, &package->components )
......
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