-
commands_utils: fix socket leak in when adding state client · d7aa5552Matthias Hardt authored
If lxc_add_state_client() is called with the container already being in the desired state the client fd will never be closed and is leaking. This due to setting stay_connected in lxc_cmd for LXC_CMD_ADD_STATE_CLIENT. If the desired state isn't already achieved the client fd will later be closed by calling lxc_cmd_fd_cleanup() but in the other case the client configuration isn't added to the handlers state clients. So the client fd has to be closed explicitely. This is simply tested by starting container A and calling lxc-wait -n A -s RUNNING. Signed-off-by:Matthias Hardt <matthias.hardt@gmail.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| lxc | Loading commit data... | |
| tests | Loading commit data... | |
| Makefile.am | Loading commit data... |