mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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.
This commit is contained in:
parent
2e0e1a91f7
commit
36ac6e37be
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user