summaryrefslogtreecommitdiff
path: root/tests/qemucommandutiltest.c
diff options
context:
space:
mode:
authorJán Tomko <jtomko@redhat.com>2021-09-03 22:45:48 +0200
committerJán Tomko <jtomko@redhat.com>2021-09-09 18:06:13 +0200
commit24b573968272eeedc41cd825e5426249e9a8ecf4 (patch)
tree6c198cc473244a5919ba60a5a8ab46b4bda91fb0 /tests/qemucommandutiltest.c
parent296f7173ed179c08d815c70b4da01b74b68fbbeb (diff)
downloadlibvirt-24b573968272eeedc41cd825e5426249e9a8ecf4.tar.gz
tests: use g_autoptr instead of virJSONValueFree
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
Diffstat (limited to 'tests/qemucommandutiltest.c')
-rw-r--r--tests/qemucommandutiltest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c
index 6b5e477849..e1cab0be90 100644
--- a/tests/qemucommandutiltest.c
+++ b/tests/qemucommandutiltest.c
@@ -37,7 +37,7 @@ static int
testQemuCommandBuildFromJSON(const void *opaque)
{
const testQemuCommandBuildObjectFromJSONData *data = opaque;
- virJSONValue *val = NULL;
+ g_autoptr(virJSONValue) val = NULL;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
g_autofree char *result = NULL;
int ret = -1;
@@ -65,7 +65,6 @@ testQemuCommandBuildFromJSON(const void *opaque)
ret = 0;
cleanup:
- virJSONValueFree(val);
return ret;
}