[libvirt PATCH 3/5] tests: virnetdevbandwidthtest: use g_auto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 tests/virnetdevbandwidthtest.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index 83e7b2089f..197d936479 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -69,7 +69,7 @@ testVirNetDevBandwidthSet(const void *data)
     const char *iface = info->iface;
     g_autoptr(virNetDevBandwidth) band = NULL;
     g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
-    char *actual_cmd = NULL;
+    g_autofree char *actual_cmd = NULL;
     g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew();
 
     PARSE(info->band, band);
@@ -96,7 +96,6 @@ testVirNetDevBandwidthSet(const void *data)
 
     ret = 0;
  cleanup:
-    VIR_FREE(actual_cmd);
     return ret;
 }
 
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux