mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
core: fix memory leak in error path
Coverity 1431998
This commit is contained in:
parent
013668db32
commit
f2550b9856
@ -3202,11 +3202,16 @@ static int apply_mount_namespace(
|
||||
|
||||
if (MANAGER_IS_SYSTEM(u->manager)) {
|
||||
propagate_dir = path_join("/run/systemd/propagate/", u->id);
|
||||
if (!propagate_dir)
|
||||
return -ENOMEM;
|
||||
if (!propagate_dir) {
|
||||
r = -ENOMEM;
|
||||
goto finalize;
|
||||
}
|
||||
|
||||
incoming_dir = strdup("/run/systemd/incoming");
|
||||
if (!incoming_dir)
|
||||
return -ENOMEM;
|
||||
if (!incoming_dir) {
|
||||
r = -ENOMEM;
|
||||
goto finalize;
|
||||
}
|
||||
}
|
||||
|
||||
r = setup_namespace(root_dir, root_image, context->root_image_options,
|
||||
|
Loading…
x
Reference in New Issue
Block a user