1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-29 15:21:50 +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:
Alex Jia 2011-11-30 13:57:07 +08:00 committed by Eric Blake
parent 7b811a74c6
commit ad8fa356a6

View File

@ -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;
}