mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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.
This commit is contained in:
parent
6ac6238de3
commit
5fa3d775a9
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user