From 11775ea7a72f0c4a134783792b5f3adee29da35a Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 26 Oct 2026 17:36:23 -0400 Subject: [PATCH] afc: Fix message leak when GUI message queue is unavailable Delete the message when getMessageQueueToGUI() returns null. The message is allocated in updateDeviceSetLists(), but was only transferred to the GUI message queue when the queue existed. Without a queue, the message was never released, causing a resource leak reported by Coverity. Keep the existing behavior of pushing the message to the GUI queue when available, and explicitly delete it otherwise. Signed-off-by: Robin Getz --- plugins/feature/afc/afc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/feature/afc/afc.cpp b/plugins/feature/afc/afc.cpp index 6c292bb14..65b5a5722 100644 --- a/plugins/feature/afc/afc.cpp +++ b/plugins/feature/afc/afc.cpp @@ -317,6 +317,8 @@ void AFC::updateDeviceSetLists() if (getMessageQueueToGUI()) { getMessageQueueToGUI()->push(msg); + } else { + delete msg; } }