core/exec-invoke: fix bogus error code

r was bogus here. getusername_malloc() can only fail on oom,
so we can simplify this.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-05-21 18:01:29 +02:00
parent 705a705e85
commit 3d0a05dcc3

View File

@@ -5430,7 +5430,7 @@ int exec_invoke(
own_user = getusername_malloc();
if (!own_user) {
*exit_status = EXIT_USER;
return log_error_errno(r, "Failed to determine my own user ID: %m");
return log_oom();
}
u = own_user;
} else