]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Ensure do_lxcapi_unfreeze returns false when getstate errors 4601/head
authorFernando Picazo <fernando.picazo@outlook.com>
Thu, 30 Oct 2025 03:37:46 +0000 (22:37 -0500)
committerFernando <25850740+FernandoPicazo@users.noreply.github.com>
Sat, 22 Nov 2025 00:45:23 +0000 (18:45 -0600)
Signed-off-by: Fernando Picazo <fernando.picazo@outlook.com>
src/lxc/lxccontainer.c

index 0f41411d8e43979241ce13d9eb58817e107d250f..6f110ea3b7035b3d4ad0c8090a0008bfa6965103 100644 (file)
@@ -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.