mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
lxc: avoid NULL dereference upon getmntent failure
* src/lxc_container.c (lxcContainerUnmountOldFS): Don't pass a NULL pointer to qsort.
This commit is contained in:
parent
cff257f584
commit
e4ac19a87a
@ -546,6 +546,7 @@ static int lxcContainerUnmountOldFS(void)
|
||||
}
|
||||
endmntent(procmnt);
|
||||
|
||||
if (mounts)
|
||||
qsort(mounts, nmounts, sizeof(mounts[0]),
|
||||
lxcContainerChildMountSort);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user