Merge pull request #16482 from poettering/coverity-246
two coverity fixes
This commit is contained in:
+1
-1
@@ -2630,7 +2630,7 @@ static int apply_mount_namespace(
|
||||
|
||||
if (streq_ptr(runtime->var_tmp_dir, RUN_SYSTEMD_EMPTY))
|
||||
var_tmp_dir = runtime->var_tmp_dir;
|
||||
else if (runtime->tmp_dir)
|
||||
else if (runtime->var_tmp_dir)
|
||||
var_tmp_dir = strjoina(runtime->var_tmp_dir, "/tmp");
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ static int group_lookup_name(Manager *m, const char *name, gid_t *ret_gid) {
|
||||
return -ENOMEM;
|
||||
|
||||
machine = hashmap_get(m->machines, mn);
|
||||
if (!mn)
|
||||
if (!machine)
|
||||
return -ESRCH;
|
||||
|
||||
if (machine->class != MACHINE_CONTAINER)
|
||||
|
||||
Reference in New Issue
Block a user