]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: virnetdevbandwidthtest: use g_auto
authorJán Tomko <jtomko@redhat.com>
Fri, 20 Aug 2021 12:58:13 +0000 (14:58 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 20 Aug 2021 14:43:20 +0000 (16:43 +0200)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/virnetdevbandwidthtest.c

index 83e7b2089f4077aa52f821c211bae00e80a79533..197d9364799ba3cc468384211708aa5b7571c2c7 100644 (file)
@@ -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;
 }