From: Fernando Picazo Date: Thu, 30 Oct 2025 03:37:46 +0000 (-0500) Subject: Ensure do_lxcapi_unfreeze returns false when getstate errors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d1700a237f671ec83e49dfa2027b9835debafbb;p=thirdparty%2Flxc.git Ensure do_lxcapi_unfreeze returns false when getstate errors Signed-off-by: Fernando Picazo --- 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.