Commit 6033b3a7 authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

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

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