Nikolay Sivov : comctl32/listview: Free column data on control destruction.

Alexandre Julliard julliard at winehq.org
Thu Oct 22 10:39:56 CDT 2009


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

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Thu Oct 22 01:12:05 2009 +0400

comctl32/listview: Free column data on control destruction.

---

 dlls/comctl32/listview.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 4ec8628..ea79b38 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -9634,6 +9634,8 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
  */
 static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr)
 {
+  INT i;
+
   TRACE("()\n");
 
   /* delete all items */
@@ -9644,6 +9646,9 @@ static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr)
   DPA_Destroy(infoPtr->hdpaItemIds);
   DPA_Destroy(infoPtr->hdpaPosX);
   DPA_Destroy(infoPtr->hdpaPosY);
+  /* columns */
+  for (i = 0; i < DPA_GetPtrCount(infoPtr->hdpaColumns); i++)
+      Free(DPA_GetPtr(infoPtr->hdpaColumns, i));
   DPA_Destroy(infoPtr->hdpaColumns);
   ranges_destroy(infoPtr->selectionRanges);
 




More information about the wine-cvs mailing list