Fix refcounting of streams.

This commit is contained in:
Mike McCormack 2004-06-29 03:49:54 +00:00 committed by Alexandre Julliard
parent 8ac61c5a1e
commit 7e168ee798
2 changed files with 4 additions and 1 deletions

View File

@ -235,7 +235,10 @@ UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record)
db_get_raw_stream( query->db, full_name, &stm );
if( stm )
{
MSI_RecordSetIStream( handle, i, stm );
IStream_Release( stm );
}
else
ERR("failed to get stream\n");
HeapFree( GetProcessHeap(), 0, sval );

View File

@ -86,7 +86,7 @@ void MSI_CloseRecord( VOID *arg )
MSIRECORD *rec = (MSIRECORD *) arg;
UINT i;
for( i=0; i<rec->count; i++ )
for( i=0; i<=rec->count; i++ )
MSI_FreeField( &rec->fields[i] );
}