Commit 804e7e91 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Remove dynamic tables from the global list when they're freed.

parent b73bbf59
...@@ -308,8 +308,10 @@ void free_table( struct table *table ) ...@@ -308,8 +308,10 @@ void free_table( struct table *table )
clear_table( table ); clear_table( table );
if (table->flags & TABLE_FLAG_DYNAMIC) if (table->flags & TABLE_FLAG_DYNAMIC)
{ {
TRACE("destroying %p\n", table);
heap_free( (WCHAR *)table->name ); heap_free( (WCHAR *)table->name );
free_columns( (struct column *)table->columns, table->num_cols ); free_columns( (struct column *)table->columns, table->num_cols );
list_remove( &table->entry );
heap_free( table ); heap_free( table );
} }
} }
...@@ -342,6 +344,7 @@ struct table *create_table( const WCHAR *name, UINT num_cols, const struct colum ...@@ -342,6 +344,7 @@ struct table *create_table( const WCHAR *name, UINT num_cols, const struct colum
table->data = data; table->data = data;
table->fill = fill; table->fill = fill;
table->flags = TABLE_FLAG_DYNAMIC; table->flags = TABLE_FLAG_DYNAMIC;
list_init( &table->entry );
return table; return table;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment