James Hawkins : msi: Close the original record before copying new data into it.

Alexandre Julliard julliard at winehq.org
Fri Dec 11 11:04:46 CST 2009


Module: wine
Branch: master
Commit: 9ab7d9e21a0e6af8159902835f17b2d82a9d0380
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9ab7d9e21a0e6af8159902835f17b2d82a9d0380

Author: James Hawkins <truiken at gmail.com>
Date:   Thu Dec 10 17:01:12 2009 -0800

msi: Close the original record before copying new data into it.

---

 dlls/msi/msipriv.h |    1 +
 dlls/msi/record.c  |    2 +-
 dlls/msi/table.c   |    3 +++
 3 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 5b23f55..0e1a23b 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -698,6 +698,7 @@ extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
                                     BOOL preserve_case );
 
 /* record internals */
+extern void MSI_CloseRecord( MSIOBJECTHDR * );
 extern UINT MSI_RecordSetIStream( MSIRECORD *, UINT, IStream *);
 extern UINT MSI_RecordGetIStream( MSIRECORD *, UINT, IStream **);
 extern const WCHAR *MSI_RecordGetString( const MSIRECORD *, UINT );
diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index 68eab69..45adbac 100644
--- a/dlls/msi/record.c
+++ b/dlls/msi/record.c
@@ -64,7 +64,7 @@ static void MSI_FreeField( MSIFIELD *field )
     }
 }
 
-static void MSI_CloseRecord( MSIOBJECTHDR *arg )
+void MSI_CloseRecord( MSIOBJECTHDR *arg )
 {
     MSIRECORD *rec = (MSIRECORD *) arg;
     UINT i;
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index d2b9a00..7c341a7 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -1835,6 +1835,9 @@ static UINT msi_refresh_record( struct tagMSIVIEW *view, MSIRECORD *rec, UINT ro
     if (r != ERROR_SUCCESS)
         return r;
 
+    /* Close the original record */
+    MSI_CloseRecord(&rec->hdr);
+
     count = MSI_RecordGetFieldCount(rec);
     for (i = 0; i < count; i++)
         MSI_RecordCopyField(curr, i + 1, rec, i + 1);




More information about the wine-cvs mailing list