File freerdp-CVE-2026-22852.patch of Package freerdp2

From cd1ffa112cfbe1b40a9fd57e299a8ea12e23df0d Mon Sep 17 00:00:00 2001
From: akallabeth <akallabeth@posteo.net>
Date: Sat, 10 Jan 2026 08:36:38 +0100
Subject: [PATCH] [channels,audin] free up old audio formats

---
 channels/audin/client/audin_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c
index bcaf1a646265..b4c8ba58073a 100644
--- a/channels/audin/client/audin_main.c
+++ b/channels/audin/client/audin_main.c
@@ -206,6 +206,10 @@ static UINT audin_process_formats(AUDIN_PLUGIN* audin, AUDIN_CHANNEL_CALLBACK* c
 	}
 
 	Stream_Seek_UINT32(s); /* cbSizeFormatsPacket */
+
+	audio_formats_free(callback->formats, callback->formats_count);
+	callback->formats_count = 0;
+
 	callback->formats = audio_formats_new(NumFormats);
 
 	if (!callback->formats)
openSUSE Build Service is sponsored by