Unverified Commit 558add0f by LiFeng Committed by Christian Brauner

Add return check for 'lxc_cmd_get_name'

If 'lxc_cmd_get_name' failed and return with NULL, this would cause a segment fault. Signed-off-by: 's avatarLiFeng <lifeng68@huawei.com>
parent 3c3e0cb5
......@@ -3594,6 +3594,8 @@ int list_active_containers(const char *lxcpath, char ***nret,
if (strncmp(lxcpath, recvpath, lxcpath_len) != 0)
continue;
p = lxc_cmd_get_name(p);
if (!p)
continue;
}
if (array_contains(&ct_name, p, ct_name_cnt))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment