summaryrefslogtreecommitdiff
path: root/tests/virnetdevbandwidthtest.c
diff options
context:
space:
mode:
authorJán Tomko <jtomko@redhat.com>2021-08-20 14:58:13 +0200
committerJán Tomko <jtomko@redhat.com>2021-08-20 16:43:20 +0200
commit3e74bb83215178f247cb7f44310a648313df794e (patch)
tree1943561edf131eb746e3f15035b6defdf4bdf025 /tests/virnetdevbandwidthtest.c
parent780b5ab62ad989d407fcbd506b7ab93974dffb9d (diff)
downloadlibvirt-3e74bb83215178f247cb7f44310a648313df794e.tar.gz
tests: virnetdevbandwidthtest: use g_auto
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Diffstat (limited to 'tests/virnetdevbandwidthtest.c')
-rw-r--r--tests/virnetdevbandwidthtest.c3
1 files changed, 1 insertions, 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;
}