Module: wine Branch: master Commit: 91ac47b84bc59617274783a431a5c46a36578ec2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=91ac47b84bc59617274783a431...
Author: Hans Leidekker hans@codeweavers.com Date: Mon Apr 20 16:08:26 2009 +0200
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().
---
dlls/msi/table.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/table.c b/dlls/msi/table.c index ab86bcd..e7e2e68 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1038,8 +1038,9 @@ static void msi_update_table_columns( MSIDATABASE *db, LPCWSTR name ) table = find_cached_table( db, name ); old_count = table->col_count; 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) return;