diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 24c0ec2798f7c9a952606d1887a34900579f48de..77cc73744f24c26de0f9027e9054051691cea3de 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27294,10 +27294,10 @@ virDomainCachetuneDefFormat(virBufferPtr buf, int ret = -1; virBufferSetChildIndent(&childrenBuf, buf); - virResctrlAllocForeachCache(resctrl->alloc, - virDomainCachetuneDefFormatHelper, - &childrenBuf); - + if (virResctrlAllocForeachCache(resctrl->alloc, + virDomainCachetuneDefFormatHelper, + &childrenBuf) < 0) + goto cleanup; if (virBufferCheckError(&childrenBuf) < 0) goto cleanup;