winex11.drv: Fix a memory leak (Coverity).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2019-09-06 22:24:11 +02:00 committed by Alexandre Julliard
parent 332dc23f36
commit 6033b3a7fb
1 changed files with 1 additions and 2 deletions

View File

@ -1849,13 +1849,12 @@ static BOOL request_selection_contents( Display *display, BOOL changed )
last_size != size ||
memcmp( last_data, data, size ));
if (!changed)
if (!changed || !OpenClipboard( clipboard_hwnd ))
{
HeapFree( GetProcessHeap(), 0, data );
return FALSE;
}
if (!OpenClipboard( clipboard_hwnd )) return FALSE;
TRACE( "selection changed, importing\n" );
EmptyClipboard();
is_clipboard_owner = TRUE;