- make sure to free the string table when closing the database

- don't free szPersist in MsiOpenDatabase if it's not a string
This commit is contained in:
Mike McCormack 2005-05-10 16:00:19 +00:00 committed by Alexandre Julliard
parent 809cf354e4
commit c1f2cf1fba
1 changed files with 3 additions and 1 deletions

View File

@ -65,6 +65,7 @@ VOID MSI_CloseDatabase( MSIOBJECTHDR *arg )
DWORD r; DWORD r;
free_cached_tables( db ); free_cached_tables( db );
msi_destroy_stringtable( db->strings );
r = IStorage_Release( db->storage ); r = IStorage_Release( db->storage );
if( r ) if( r )
ERR("database reference count was not zero (%ld)\n", r); ERR("database reference count was not zero (%ld)\n", r);
@ -213,6 +214,7 @@ UINT WINAPI MsiOpenDatabaseA(LPCSTR szDBPath, LPCSTR szPersist, MSIHANDLE *phDB)
r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB ); r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB );
end: end:
if( HIWORD(szPersist) )
HeapFree( GetProcessHeap(), 0, szwPersist ); HeapFree( GetProcessHeap(), 0, szwPersist );
HeapFree( GetProcessHeap(), 0, szwDBPath ); HeapFree( GetProcessHeap(), 0, szwDBPath );