1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-09 01:18:00 +03:00

virDomainFeaturesDefParse: Fix memory leak

Fixes: 94013ee04e
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-04-19 13:54:12 +02:00 committed by Laine Stump
parent 4eb7c62198
commit 1294de209c

View File

@ -18780,12 +18780,12 @@ virDomainFeaturesDefParse(virDomainDef *def,
int feature;
int value;
g_autofree char *ptval = NULL;
g_autofree char *tmp = NULL;
if ((n = virXPathNodeSet("./features/xen/*", ctxt, &nodes)) < 0)
return -1;
for (i = 0; i < n; i++) {
g_autofree char *tmp = NULL;
feature = virDomainXenTypeFromString((const char *)nodes[i]->name);
if (feature < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,