From 8843cd113e86245359ac37af53d3253c1be4ac5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Mon, 13 Dec 2021 19:30:23 +0100 Subject: [PATCH] tests: use g_auto in testCompareXMLToConfFiles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use g_auto for dnsmasq context and remove the cmd variable. It was unused since its introduction in: commit 8b32c80df089a3612a0448c1a92abc2071d6b6a9 Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- tests/networkxml2conftest.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index b76d72793a..7177505918 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -24,9 +24,8 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf, int ret = -1; virNetworkDef *def = NULL; virNetworkObj *obj = NULL; - virCommand *cmd = NULL; g_autofree char *pidfile = NULL; - dnsmasqContext *dctx = NULL; + g_autoptr(dnsmasqContext) dctx = NULL; g_autoptr(virNetworkXMLOption) xmlopt = NULL; if (!(xmlopt = networkDnsmasqCreateXMLConf())) @@ -82,9 +81,7 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf, fail: VIR_FREE(confactual); - virCommandFree(cmd); virNetworkObjEndAPI(&obj); - dnsmasqContextFree(dctx); return ret; } -- 2.47.2