Commit 92a8c691 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32: Fix memory leaks.

parent a8502312
...@@ -2633,7 +2633,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r ...@@ -2633,7 +2633,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
abs(es->selection_end - es->selection_start) - strl, hrgn); abs(es->selection_end - es->selection_start) - strl, hrgn);
strl = 0; strl = 0;
e = s; e = s;
hrgn = CreateRectRgn(0, 0, 0, 0); SetRectRgn(hrgn, 0, 0, 0, 0);
EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); EDIT_NOTIFY_PARENT(es, EN_MAXTEXT);
} }
} }
......
...@@ -976,7 +976,11 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip ) ...@@ -976,7 +976,11 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip )
hdc = GetDCEx( hwnd, hrgn, DCX_USESTYLE | DCX_WINDOW | DCX_EXCLUDERGN ); hdc = GetDCEx( hwnd, hrgn, DCX_USESTYLE | DCX_WINDOW | DCX_EXCLUDERGN );
} }
if (!hdc) return; if (!hdc)
{
DeleteObject( hrgn );
return;
}
WIN_GetRectangles( hwnd, COORDS_WINDOW, &rect, NULL ); WIN_GetRectangles( hwnd, COORDS_WINDOW, &rect, NULL );
GetClipBox( hdc, &rectClip ); GetClipBox( hdc, &rectClip );
......
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