projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d51236d
)
nspawn: don't try to unregister a machine we never registered
author
Lennart Poettering
<lennart@poettering.net>
Wed, 27 Nov 2024 09:26:04 +0000
(10:26 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 29 Nov 2024 13:26:57 +0000
(14:26 +0100)
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.
(cherry picked from commit
0790f4e45f2f8c094bf929aa1fcaf4c7e9dbb001
)
src/nspawn/nspawn.c
patch
|
blob
|
history
diff --git
a/src/nspawn/nspawn.c
b/src/nspawn/nspawn.c
index 4e15112addf0a67d88450ff322393470402a830c..459caa7c58a994b46c8cbbe32b0853dcdd66166a 100644
(file)
--- a/
src/nspawn/nspawn.c
+++ b/
src/nspawn/nspawn.c
@@
-5644,7
+5644,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)