]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/lxccontainer.c
coverity: #1435806
[mirror_lxc.git] / src / lxc / lxccontainer.c
index 2a806676708acd92bc0dfb0bcd0c588b2704f29c..1910e23a69ad3e3e4030552fca64b2d03e5c2e02 100644 (file)
@@ -1971,11 +1971,8 @@ static bool do_lxcapi_reboot2(struct lxc_container *c, int timeout)
        }
        TRACE("Sent signal %d to pid %d", rebootsignal, pid);
 
-       if (timeout == 0) {
-               if (state_client_fd >= 0)
-                       close(state_client_fd);
+       if (timeout == 0)
                return true;
-       }
 
        ret = lxc_cmd_sock_rcv_state(state_client_fd, timeout);
        close(state_client_fd);