提交 36ac6e37 编写于 作者: J John Ferlan 提交者: Eric Blake

lxc: Avoid possible NULL dereference on *root prior to opendir().

If running on older Linux without mounted cgroups then its possible that
*root would be NULL.
上级 2e0e1a91
......@@ -1762,6 +1762,12 @@ static int lxcContainerIdentifyCGroups(struct lxcContainerCGroup **mountsret,
VIR_DEBUG("Grabbed '%s'", mntent.mnt_dir);
}
if (!*root) {
VIR_DEBUG("No mounted cgroups found");
ret = 0;
goto cleanup;
}
VIR_DEBUG("Checking for symlinks in %s", *root);
if (!(dh = opendir(*root))) {
virReportSystemError(errno,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册