]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: qemublocktest: fix memory leak
authorJán Tomko <jtomko@redhat.com>
Fri, 17 Mar 2023 14:34:02 +0000 (15:34 +0100)
committerJán Tomko <jtomko@redhat.com>
Fri, 17 Mar 2023 14:36:36 +0000 (15:36 +0100)
Set enccount to 1, so the cleanup function knows
there is something to be cleaned up.

Fixes: 1992ae40fac90c315d0d8d1a9c6f880bd0a39b57
Signed-off-by: Ján Tomko <jtomko@redhat.com>
tests/qemublocktest.c

index 2d790e2b2ef2acbd02ddd06777f43d86eb8ebe08..9a968477d7fcf9b48f5adb476064d62df92e2f9b 100644 (file)
@@ -242,6 +242,7 @@ testQemuDiskXMLToJSONFakeSecrets(virStorageSource *src)
 
         srcpriv->encinfo[0]->alias = g_strdup_printf("%s-encalias",
                                                      NULLSTR(src->nodeformat));
+        srcpriv->enccount = 1;
     }
 
     return 0;