Commit 64e169d9 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

user32: Avoid memory leaks (coverity).

parent 92473283
......@@ -2903,7 +2903,11 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
handle_internal_message( info.msg.hwnd, info.msg.message,
info.msg.wParam, info.msg.lParam );
/* if this is a nested call return right away */
if (first == info.msg.message && last == info.msg.message) return FALSE;
if (first == info.msg.message && last == info.msg.message)
{
HeapFree( GetProcessHeap(), 0, buffer );
return FALSE;
}
}
else
peek_message( msg, info.msg.hwnd, info.msg.message,
......
......@@ -985,15 +985,22 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
p = str; while (p < str+len && *p != TAB) p++;
len_seg = p - str;
if (len_seg != len && !GetTextExtentPointW(hdc, str, len_seg, &size))
{
HeapFree (GetProcessHeap(), 0, retstr);
return 0;
}
}
else
len_seg = len;
if (!ExtTextOutW( hdc, xseg, y,
((flags & DT_NOCLIP) ? 0 : ETO_CLIPPED) |
((flags & DT_RTLREADING) ? ETO_RTLREADING : 0),
rect, str, len_seg, NULL )) return 0;
rect, str, len_seg, NULL ))
{
HeapFree (GetProcessHeap(), 0, retstr);
return 0;
}
if (prefix_offset != -1 && prefix_offset < len_seg)
{
TEXT_DrawUnderscore (hdc, xseg, y + tm.tmAscent + 1, str, prefix_offset, (flags & DT_NOCLIP) ? NULL : rect);
......
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