From d9d81d347c4264f2f7dfe9fa1c87f7158c820dec Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 17 Jul 2024 09:49:40 +0200 Subject: [PATCH] [client,X11] fix clipboard locking --- client/X11/xf_cliprdr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 90586602a..98f3c8668 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -926,14 +926,15 @@ static void xf_cliprdr_process_requested_data(xfClipboard* clipboard, BOOL hasDa if (error) WLog_ERR(TAG, "failed to serialize CLIPRDR_FILELIST: 0x%08X", error); + else + { + UINT32 formatId = ClipboardGetFormatId(clipboard->system, mime_uri_list); + UINT32 url_size = 0; - UINT32 formatId = ClipboardGetFormatId(clipboard->system, mime_uri_list); - UINT32 url_size = 0; - ClipboardLock(clipboard->system); - char* url = ClipboardGetData(clipboard->system, formatId, &url_size); - ClipboardUnlock(clipboard->system); - cliprdr_file_context_update_client_data(clipboard->file, url, url_size); - free(url); + char* url = ClipboardGetData(clipboard->system, formatId, &url_size); + cliprdr_file_context_update_client_data(clipboard->file, url, url_size); + free(url); + } free(file_array); }