msi: Fix a couple of memory leaks (Coverity).
This commit is contained in:
parent
17405f6b91
commit
f9dc20cfcc
|
@ -809,7 +809,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
||||||
/* add each column to the _Columns table */
|
/* add each column to the _Columns table */
|
||||||
r = TABLE_CreateView( db, szColumns, &tv );
|
r = TABLE_CreateView( db, szColumns, &tv );
|
||||||
if( r )
|
if( r )
|
||||||
return r;
|
goto err;
|
||||||
|
|
||||||
r = tv->ops->execute( tv, 0 );
|
r = tv->ops->execute( tv, 0 );
|
||||||
TRACE("tv execute returned %x\n", r);
|
TRACE("tv execute returned %x\n", r);
|
||||||
|
@ -2325,8 +2325,7 @@ err:
|
||||||
}
|
}
|
||||||
|
|
||||||
static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string_table *st,
|
static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string_table *st,
|
||||||
IStorage *stg,
|
IStorage *stg, const BYTE *rawdata, UINT bytes_per_strref )
|
||||||
const BYTE *rawdata, UINT bytes_per_strref )
|
|
||||||
{
|
{
|
||||||
UINT i, val, ofs = 0;
|
UINT i, val, ofs = 0;
|
||||||
USHORT mask;
|
USHORT mask;
|
||||||
|
@ -2359,12 +2358,14 @@ static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string
|
||||||
|
|
||||||
r = msi_record_encoded_stream_name( tv, rec, &encname );
|
r = msi_record_encoded_stream_name( tv, rec, &encname );
|
||||||
if ( r != ERROR_SUCCESS )
|
if ( r != ERROR_SUCCESS )
|
||||||
|
{
|
||||||
|
msiobj_release( &rec->hdr );
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
r = IStorage_OpenStream( stg, encname, NULL,
|
r = IStorage_OpenStream( stg, encname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm );
|
||||||
STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm );
|
|
||||||
if ( r != ERROR_SUCCESS )
|
if ( r != ERROR_SUCCESS )
|
||||||
{
|
{
|
||||||
|
msiobj_release( &rec->hdr );
|
||||||
msi_free( encname );
|
msi_free( encname );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue