[network/krdc] rdp: Implement suggested fix

Fabio Bas <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit a21e2f1787869958735abf7888893991961b5547 by Fabio Bas.
Committed on 17/07/2026 at 09:01.
Pushed by ctrlaltca into branch 'master'.

Implement suggested fix

M  +1    -3    rdp/rdpcliprdr.cpp

https://invent.kde.org/network/krdc/-/commit/a21e2f1787869958735abf7888893991961b5547

diff --git a/rdp/rdpcliprdr.cpp b/rdp/rdpcliprdr.cpp
index bd6f267b..9e24db89 100644
--- a/rdp/rdpcliprdr.cpp
+++ b/rdp/rdpcliprdr.cpp
@@ -65,9 +65,7 @@ UINT RdpClipboard::onSendClientFormatList(CliprdrClientContext *cliprdr)
 
     if (!cliprdr->ClientFormatList) {
         free(pFormatIds);
-        if (formats)
-            free(formats->formatName);
-        delete[] formats;
+        cliprdr_format_free(formats, numFormats);
         return ERROR_INTERNAL_ERROR;
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.