From 1d1700a237f671ec83e49dfa2027b9835debafbb Mon Sep 17 00:00:00 2001 From: Fernando Picazo Date: Wed, 29 Oct 2025 22:37:46 -0500 Subject: [PATCH] Ensure do_lxcapi_unfreeze returns false when getstate errors Signed-off-by: Fernando Picazo --- src/lxc/lxccontainer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 0f41411d8..6f110ea3b 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -540,6 +540,11 @@ static bool do_lxcapi_unfreeze(struct lxc_container *c) return false; s = lxc_getstate(c->name, c->config_path, 0); + + if (s < 0) { + return false; + } + // Prevent lxc from unexpectedly exiting when executing freeze, // causing the container to be in the FREEZING state, // making normal life cycle management impossible. -- 2.47.3