mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 07:47:05 +00:00
coverity: #1425923
avoid NULL-pointer dereference Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
94f0035bf6
commit
9d6514f222
@ -555,7 +555,10 @@ static bool find_hierarchy_mountpts( struct cgroup_meta_data *meta_data, char **
|
||||
}
|
||||
}
|
||||
|
||||
k = lxc_array_len((void **)h->all_mount_points);
|
||||
if (h)
|
||||
k = lxc_array_len((void **)h->all_mount_points);
|
||||
else
|
||||
k = 0;
|
||||
r = lxc_grow_array((void ***)&h->all_mount_points, &h->all_mount_point_capacity, k + 1, 4);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user