MSI: fix a bug caused by freeing memory too soon in the table code
Mike McCormack
mike at codeweavers.com
Thu Jan 20 05:53:55 CST 2005
ChangeLog:
* fix a bug caused by freeing memory too soon in the table code
-------------- next part --------------
Index: dlls/msi/table.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/table.c,v
retrieving revision 1.25
diff -u -p -r1.25 table.c
--- dlls/msi/table.c 22 Dec 2004 15:22:12 -0000 1.25
+++ dlls/msi/table.c 20 Jan 2005 11:43:17 -0000
@@ -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
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);
More information about the wine-patches
mailing list