1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

tests: use g_auto in testCompareXMLToConfFiles

Use g_auto for dnsmasq context and remove the cmd variable.
It was unused since its introduction in:
commit 8b32c80df0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2021-12-13 19:30:23 +01:00
parent e86d62f8f7
commit 8843cd113e

View File

@ -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;
}