Commit a8502312 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

comctl32: Fix memory leaks.

parent 7fba4ebb
......@@ -2514,7 +2514,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
abs(es->selection_end - es->selection_start) - strl, hrgn);
strl = 0;
e = s;
hrgn = CreateRectRgn(0, 0, 0, 0);
SetRectRgn(hrgn, 0, 0, 0, 0);
EDIT_NOTIFY_PARENT(es, EN_MAXTEXT);
}
}
......@@ -3674,6 +3674,8 @@ static void EDIT_WM_NCPaint(HWND hwnd, HRGN region)
/* Call default proc to get the scrollbars etc. also painted */
DefWindowProcW (hwnd, WM_NCPAINT, (WPARAM)cliprgn, 0);
if (cliprgn != region)
DeleteObject(cliprgn);
}
/*********************************************************************
......
......@@ -10645,6 +10645,7 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
/* Call default proc to get the scrollbars etc. painted */
DefWindowProcW (infoPtr->hwndSelf, WM_NCPAINT, (WPARAM)cliprgn, 0);
DeleteObject(cliprgn);
return FALSE;
}
......
......@@ -5468,6 +5468,7 @@ static BOOL TREEVIEW_NCPaint (const TREEVIEW_INFO *infoPtr, HRGN region, LPARAM
/* Call default proc to get the scrollbars etc. painted */
DefWindowProcW (infoPtr->hwnd, WM_NCPAINT, (WPARAM)cliprgn, 0);
DeleteObject(cliprgn);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment