James Hawkins : msi: Implement DROP_delete that deletes the drop view. We were leaking the view before.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 09:51:20 CST 2009


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

Author: James Hawkins <truiken at gmail.com>
Date:   Sun Dec 13 19:36:16 2009 -0800

msi: Implement DROP_delete that deletes the drop view. We were leaking the view before.

---

 dlls/msi/drop.c  |   16 +++++++++++++++-
 dlls/msi/table.c |    1 -
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/drop.c b/dlls/msi/drop.c
index a385633..f0b5803 100644
--- a/dlls/msi/drop.c
+++ b/dlls/msi/drop.c
@@ -78,6 +78,20 @@ static UINT DROP_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
     return ERROR_FUNCTION_FAILED;
 }
 
+static UINT DROP_delete( struct tagMSIVIEW *view )
+{
+    MSIDROPVIEW *dv = (MSIDROPVIEW*)view;
+
+    TRACE("%p\n", dv );
+
+    if( dv->table )
+        dv->table->ops->delete( dv->table );
+
+    msi_free( dv );
+
+    return ERROR_SUCCESS;
+}
+
 static const MSIVIEWOPS drop_ops =
 {
     NULL,
@@ -91,7 +105,7 @@ static const MSIVIEWOPS drop_ops =
     DROP_get_dimensions,
     NULL,
     NULL,
-    NULL,
+    DROP_delete,
     NULL,
     NULL,
     NULL,
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 7c341a7..fc36079 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -2326,7 +2326,6 @@ static UINT TABLE_drop(struct tagMSIVIEW *view)
 
     list_remove(&tv->table->entry);
     free_table(tv->table);
-    TABLE_delete(view);
 
 done:
     msiobj_release(&rec->hdr);




More information about the wine-cvs mailing list