Module: wine Branch: master Commit: d9e40b821988ffe363af56d0264b89e2c29ca043 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9e40b821988ffe363af56d026...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Feb 19 12:25:38 2010 +0100
msi: Destroy streams cache when applying a transform.
---
dlls/msi/database.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 7855fea..757be67 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -225,16 +225,6 @@ end: return ret; }
-void append_storage_to_db( MSIDATABASE *db, IStorage *stg ) -{ - MSITRANSFORM *t; - - t = msi_alloc( sizeof *t ); - t->stg = stg; - IStorage_AddRef( stg ); - list_add_tail( &db->transforms, &t->entry ); -} - static void free_transforms( MSIDATABASE *db ) { while( !list_empty( &db->transforms ) ) @@ -259,6 +249,19 @@ static void free_streams( MSIDATABASE *db ) } }
+void append_storage_to_db( MSIDATABASE *db, IStorage *stg ) +{ + MSITRANSFORM *t; + + t = msi_alloc( sizeof *t ); + t->stg = stg; + IStorage_AddRef( stg ); + list_add_tail( &db->transforms, &t->entry ); + + /* the transform may add or replace streams */ + free_streams( db ); +} + static VOID MSI_CloseDatabase( MSIOBJECTHDR *arg ) { MSIDATABASE *db = (MSIDATABASE *) arg;