MSI: make sure to free the string table when closing the database
Mike McCormack
mike at codeweavers.com
Tue May 10 10:03:32 CDT 2005
ChangeLog:
* make sure to free the string table when closing the database
* don't free szPersist in MsiOpenDatabase if it's not a string
-------------- next part --------------
Index: dlls/msi/database.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/database.c,v
retrieving revision 1.2
diff -u -p -r1.2 database.c
--- dlls/msi/database.c 26 Apr 2005 14:30:15 -0000 1.2
+++ dlls/msi/database.c 10 May 2005 15:03:12 -0000
@@ -65,6 +65,7 @@ VOID MSI_CloseDatabase( MSIOBJECTHDR *ar
DWORD r;
free_cached_tables( db );
+ msi_destroy_stringtable( db->strings );
r = IStorage_Release( db->storage );
if( r )
ERR("database reference count was not zero (%ld)\n", r);
@@ -213,7 +214,8 @@ UINT WINAPI MsiOpenDatabaseA(LPCSTR szDB
r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB );
end:
- HeapFree( GetProcessHeap(), 0, szwPersist );
+ if( HIWORD(szPersist) )
+ HeapFree( GetProcessHeap(), 0, szwPersist );
HeapFree( GetProcessHeap(), 0, szwDBPath );
return r;
More information about the wine-patches
mailing list