From 287df277ff28bcc99384c84bf65b0ec81f2f6c3c Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 8 Feb 2018 16:06:31 +0100 Subject: [PATCH] coverity: #1425971 Dereference after null check Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/cgroups/cgfs.c b/src/lxc/cgroups/cgfs.c index 89aec91f7..a2630efa4 100644 --- a/src/lxc/cgroups/cgfs.c +++ b/src/lxc/cgroups/cgfs.c @@ -523,6 +523,8 @@ static bool find_hierarchy_mountpts( struct cgroup_meta_data *meta_data, char ** } } lxc_free_array((void **)subsystems, free); + if (!h) + goto out; r = lxc_grow_array((void ***)&meta_data->mount_points, &mount_point_capacity, mount_point_count + 1, 12); if (r < 0)