From 246d187a0fda00eb7ee3debf8bcbc35472a3e29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 17 Mar 2023 15:34:02 +0100 Subject: [PATCH] tests: qemublocktest: fix memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set enccount to 1, so the cleanup function knows there is something to be cleaned up. Fixes: 1992ae40fac90c315d0d8d1a9c6f880bd0a39b57 Signed-off-by: Ján Tomko --- tests/qemublocktest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 2d790e2b2e..9a968477d7 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -242,6 +242,7 @@ testQemuDiskXMLToJSONFakeSecrets(virStorageSource *src) srcpriv->encinfo[0]->alias = g_strdup_printf("%s-encalias", NULLSTR(src->nodeformat)); + srcpriv->enccount = 1; } return 0;