From 48df74715003fcfc23132686527e48da3be4976a Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Thu, 20 Jan 2005 19:57:22 +0000 Subject: [PATCH] Fix a bug caused by freeing memory too soon in the table code. --- dlls/msi/table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 603097adbf3..80b8087acf2 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -196,8 +196,8 @@ void enum_stream_names( IStorage *stg ) if( FAILED( r ) || !count ) break; decode_streamname( stat.pwcsName, name ); - ERR("stream %2ld -> %s %s\n", n, - debugstr_w(stat.pwcsName), debugstr_w(name) ); + TRACE("stream %2ld -> %s %s\n", n, + debugstr_w(stat.pwcsName), debugstr_w(name) ); n++; } @@ -356,12 +356,12 @@ static UINT write_stream_data( IStorage *stg, LPCWSTR stname, encname = encode_streamname(TRUE, stname ); r = IStorage_OpenStream( stg, encname, NULL, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - HeapFree( GetProcessHeap(), 0, encname ); if( FAILED(r) ) { r = IStorage_CreateStream( stg, encname, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); } + HeapFree( GetProcessHeap(), 0, encname ); if( FAILED( r ) ) { ERR("open stream failed r = %08lx\n",r);