Fix use of freed memory in Listview control

Robert Shearman R.J.Shearman at warwick.ac.uk
Mon May 12 12:32:40 CDT 2003


Found by Valgrind. Thanks again Adam!

ChangeLog:
Fix use of freed memory in Listview control

Rob
-------------- next part --------------
Index: wine/dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.350
diff -u -r1.350 listview.c
--- wine/dlls/comctl32/listview.c	11 May 2003 03:44:13 -0000	1.350
+++ wine/dlls/comctl32/listview.c	12 May 2003 16:08:47 -0000
@@ -7878,10 +7878,11 @@
   if (infoPtr->hDefaultFont) DeleteObject(infoPtr->hDefaultFont);
   if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
 
+  SetWindowLongW(infoPtr->hwndSelf, 0, 0);
+
   /* free listview info pointer*/
   COMCTL32_Free(infoPtr);
 
-  SetWindowLongW(infoPtr->hwndSelf, 0, 0);
   return 0;
 }
 


More information about the wine-patches mailing list