mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 02:15:23 +00: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) {
|
if (i != 0) {
|
||||||
virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("Only the first console can be a serial port"));
|
_("Only the first console can be a serial port"));
|
||||||
|
virDomainChrDefFree(chr);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user