From 5fa3d775a9f8cdb3423373eb084219aaf778df11 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 13 Oct 2011 16:10:47 -0600 Subject: [PATCH] conf: plug memory leak on error Detected by Coverity. Leak present since commit 874e65a; and while commit d50bb45 tried to fix the issue, it missed a path. * src/conf/domain_conf.c (virDomainDefParseBootXML): Always clean up useserial. --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8cd493b3a6..844af27fee 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6327,13 +6327,13 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt, } else { def->os.bios.useserial = VIR_DOMAIN_BIOS_USESERIAL_NO; } - VIR_FREE(useserial); } *bootCount = deviceBoot; ret = 0; cleanup: + VIR_FREE(useserial); VIR_FREE(nodes); return ret; } -- 2.47.2