[libvirt] [PATCH] CONF: bug, release 'alloc' object in cleanup
Wang Huaqiang
huaqiang.wang at intel.com
Sun Apr 28 08:52:41 UTC 2019
In case error happens before 'alloc' is transferred to 'resctrl',
the 'alloc' object should be released.
Signed-off-by: Wang Huaqiang <huaqiang.wang at intel.com>
---
src/conf/domain_conf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6331424..7d20276 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19396,6 +19396,7 @@ virDomainCachetuneDefParse(virDomainDefPtr def,
ret = 0;
cleanup:
+ virObjectUnref(alloc);
virDomainResctrlDefFree(resctrl);
return ret;
}
@@ -19597,6 +19598,7 @@ virDomainMemorytuneDefParse(virDomainDefPtr def,
ret = 0;
cleanup:
+ virObjectUnref(alloc);
virDomainResctrlDefFree(resctrl);
return ret;
}
--
2.7.4
More information about the libvir-list
mailing list