In case error happens before 'alloc' is transferred to 'resctrl', the 'alloc' object should be released. Signed-off-by: Wang Huaqiang <huaqiang.wang@xxxxxxxxx> --- 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 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list