mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-17 06:03:52 +03:00
conf: Plug memory leak on virDomainDefParseXML() error path
Detected by Coverity. Leak introduced in commit 0873b68. Signed-off-by: Alex Jia <ajia@redhat.com>
This commit is contained in:
parent
7b811a74c6
commit
ad8fa356a6
@ -7540,6 +7540,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
|
||||
if (i != 0) {
|
||||
virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Only the first console can be a serial port"));
|
||||
virDomainChrDefFree(chr);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user