Marcus Meissner : comctl32: Free the selection ranges (Coverity).

Alexandre Julliard julliard at winehq.org
Tue Jan 8 13:58:41 CST 2013


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

Author: Marcus Meissner <meissner at suse.de>
Date:   Mon Jan  7 22:17:39 2013 +0100

comctl32: Free the selection ranges (Coverity).

---

 dlls/comctl32/listview.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 3076249..2c953ad 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -3594,9 +3594,15 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
 	POINT ptItem;
 	
 	rcItem.left = LVIR_BOUNDS;
-	if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) return;
+	if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) {
+	     ranges_destroy (selection);
+	     return;
+	}
 	rcSelMark.left = LVIR_BOUNDS;
-	if (!LISTVIEW_GetItemRect(infoPtr, infoPtr->nSelectionMark, &rcSelMark)) return;
+	if (!LISTVIEW_GetItemRect(infoPtr, infoPtr->nSelectionMark, &rcSelMark)) {
+	     ranges_destroy (selection);
+	     return;
+	}
 	UnionRect(&rcSel, &rcItem, &rcSelMark);
 	iterator_frameditems(&i, infoPtr, &rcSel);
 	while(iterator_next(&i))




More information about the wine-cvs mailing list