提交 50de0e08 编写于 作者: J John Ferlan

libxl_conf: Resolve Coverity issue with call to regcomp()

上级 0047d5d6
......@@ -769,10 +769,19 @@ error:
virCapsPtr
libxlMakeCapabilities(libxl_ctx *ctx)
{
int err;
libxl_physinfo phy_info;
const libxl_version_info *ver_info;
regcomp(&xen_cap_rec, xen_cap_re, REG_EXTENDED);
err = regcomp(&xen_cap_rec, xen_cap_re, REG_EXTENDED);
if (err != 0) {
char error[100];
regerror(err, &xen_cap_rec, error, sizeof(error));
regfree(&xen_cap_rec);
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to compile regex %s"), error);
return NULL;
}
if (libxl_get_physinfo(ctx, &phy_info) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部