From 225b363d50d9a5f678a79dde54db3879e6c83196 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 7 Jan 2021 14:22:17 +0100 Subject: [PATCH] qemuMonitorFdsetsFree: Don't leak @set->fds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The @fds member of qemuMonitorFdsetInfo struct is an array and as such, it's allocated in qemuMonitorJSONQueryFdsetsParse() but not freed in qemuMonitorFdsetsFree(). Fixes: b8998cc670f7b1b11a83276050e49dce7efba333 Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 40f2997cb6..abdd9d5240 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2708,6 +2708,8 @@ void qemuMonitorFdsetsFree(qemuMonitorFdsetsPtr fdsets) for (j = 0; j < set->nfds; j++) g_free(set->fds[j].opaque); + + g_free(set->fds); } g_free(fdsets->fdsets); g_free(fdsets);