Dereference after null check
userns_exec_{1,full} are called from functions that might not have a conf.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
int ret = -1, status = -1;
struct lxc_list *idmap;
+ if (!conf)
+ return -EINVAL;
+
idmap = get_minimal_idmap(conf);
if (!idmap)
return -1;
struct id_map *container_root_uid = NULL, *container_root_gid = NULL,
*host_uid_map = NULL, *host_gid_map = NULL;
+ if (!conf)
+ return -EINVAL;
+
ret = pipe(p);
if (ret < 0) {
SYSERROR("opening pipe");
{
if (!c || !lxcapi_is_defined(c))
return false;
+
if (has_snapshots(c)) {
ERROR("Container %s has snapshots; not removing", c->name);
return false;