From df7fa7bae605e865c5ab2b80461a4ccbbbfc1fab Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 22 Nov 2020 03:16:31 +0000 Subject: uxc: fix incomplete commit Fixes: 04a2edd ("uxc: make force-delete kill container process") Signed-off-by: Daniel Golle --- uxc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'uxc.c') diff --git a/uxc.c b/uxc.c index 9e73b07..5809b6d 100644 --- a/uxc.c +++ b/uxc.c @@ -639,6 +639,7 @@ static int uxc_boot(void) static int uxc_delete(char *name, bool force) { struct blob_attr *cur, *tb[__CONF_MAX]; + struct runtime_state *s = NULL; int rem, ret = 0; bool found = false; char *fname; @@ -663,9 +664,11 @@ static int uxc_delete(char *name, bool force) if (!found) return ENOENT; + s = avl_find_element(&runtime, name, s, avl); + if (s && s->running) { if (force) { - ret = uxc_kill(name, SIGKILL)); + ret = uxc_kill(name, SIGKILL); if (ret) goto errout; -- cgit v1.2.1