msi: Fix a double free.

TABLE_drop() calls TABLE_remove_column() which calls msi_update_table_columns()
which frees column info and possibly returns without reallocating. When that
happens it will be freed again when TABLE_drop() finally calls free_table().
This commit is contained in:
Hans Leidekker 2009-04-20 16:08:26 +02:00 committed by Alexandre Julliard
parent 182e75140e
commit 91ac47b84b
1 changed files with 2 additions and 1 deletions

View File

@ -1038,8 +1038,9 @@ static void msi_update_table_columns( MSIDATABASE *db, LPCWSTR name )
table = find_cached_table( db, name ); table = find_cached_table( db, name );
old_count = table->col_count; old_count = table->col_count;
msi_free( table->colinfo ); msi_free( table->colinfo );
table_get_column_info( db, name, &table->colinfo, &table->col_count ); table->colinfo = NULL;
table_get_column_info( db, name, &table->colinfo, &table->col_count );
if (!table->col_count) if (!table->col_count)
return; return;