[libvirt PATCH 03/14] tests: Drop unnecessary free

Andrea Bolognani abologna at redhat.com
Mon Mar 6 10:10:36 UTC 2023


The various TLSx509certdirs can be set throughout the lifetime
of the test program without issue.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 tests/qemuxml2argvtest.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index f46fc29f32..cdcd040270 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1293,7 +1293,6 @@ mymain(void)
     DO_TEST_CAPS_VER("disk-network-tlsx509-vxhs", "5.0.0");
     DO_TEST_CAPS_LATEST("disk-network-http");
     driver.config->vxhsTLS = 0;
-    VIR_FREE(driver.config->vxhsTLSx509certdir);
     DO_TEST_CAPS_LATEST("disk-no-boot");
     DO_TEST_CAPS_LATEST("disk-nvme");
     DO_TEST_CAPS_VER("disk-vhostuser-numa", "4.2.0");
@@ -1396,7 +1395,6 @@ mymain(void)
     VIR_FREE(driver.config->vncTLSx509secretUUID);
     driver.config->vncSASL = driver.config->vncTLSx509verify = driver.config->vncTLS = 0;
     VIR_FREE(driver.config->vncSASLdir);
-    VIR_FREE(driver.config->vncTLSx509certdir);
     DO_TEST_CAPS_LATEST("graphics-vnc-egl-headless");
 
     DO_TEST("graphics-sdl",
@@ -1566,14 +1564,11 @@ mymain(void)
     DO_TEST("serial-tcp-tlsx509-chardev-notls",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST_CAPS_LATEST("serial-tcp-tlsx509-chardev-notls");
-    VIR_FREE(driver.config->chardevTLSx509certdir);
-    driver.config->chardevTLSx509certdir = g_strdup("/etc/pki/libvirt-chardev");
     driver.config->chardevTLSx509secretUUID = g_strdup("6fd3f62d-9fe7-4a4e-a869-7acd6376d8ea");
     DO_TEST("serial-tcp-tlsx509-secret-chardev",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST_CAPS_LATEST("serial-tcp-tlsx509-secret-chardev");
     driver.config->chardevTLS = 0;
-    VIR_FREE(driver.config->chardevTLSx509certdir);
     DO_TEST("serial-many-chardev",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST_NOCAPS("parallel-tcp-chardev");
@@ -2983,7 +2978,6 @@ mymain(void)
 
     DO_TEST_CAPS_LATEST("crypto-builtin");
 
-    VIR_FREE(driver.config->nbdTLSx509certdir);
     qemuTestDriverFree(&driver);
     virFileWrapperClearPrefixes();
 
-- 
2.39.2



More information about the libvir-list mailing list