mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
nspawn: don't try to unregister a machine we never registered
When registering we condition this on "arg_register". Let's do the same when unregistering, otherwise we might end up trying to unregister a machine we never registered.
This commit is contained in:
committed by
Yu Watanabe
parent
92033d8fba
commit
0790f4e45f
@@ -5772,7 +5772,7 @@ static int run_container(
|
||||
r = wait_for_container(TAKE_PID(*pid), &container_status);
|
||||
|
||||
/* Tell machined that we are gone. */
|
||||
if (bus)
|
||||
if (arg_register && bus)
|
||||
(void) unregister_machine(bus, arg_machine);
|
||||
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user