提交 ad8fa356 编写于 作者: A Alex Jia 提交者: Eric Blake

conf: Plug memory leak on virDomainDefParseXML() error path

Detected by Coverity. Leak introduced in commit 0873b688.
Signed-off-by: NAlex Jia <ajia@redhat.com>
上级 7b811a74
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部