From: Ján Tomko Date: Fri, 17 Mar 2023 14:34:02 +0000 (+0100) Subject: tests: qemublocktest: fix memory leak X-Git-Tag: v9.2.0-rc1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=246d187a0fda00eb7ee3debf8bcbc35472a3e29f;p=thirdparty%2Flibvirt.git tests: qemublocktest: fix memory leak Set enccount to 1, so the cleanup function knows there is something to be cleaned up. Fixes: 1992ae40fac90c315d0d8d1a9c6f880bd0a39b57 Signed-off-by: Ján Tomko --- 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;