# cmdq_free_state

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L244
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-cmdq_free_state/

```c
void cmdq_free_state(struct cmdq_state *state)
```

## Parameters

- `state` (`struct cmdq_state *`)

## Called by

- [`cmd_if_shell_callback`](/en/tmux/3.2a/reference/c-function-cmd-if-shell-c-cmd_if_shell_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-if-shell.c#L182)
- [`cmdq_get_command`](/en/tmux/3.2a/reference/c-function-cmdq_get_command/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L513)
- [`cmdq_insert_hook`](/en/tmux/3.2a/reference/c-function-cmdq_insert_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L428)
- [`cmdq_remove`](/en/tmux/3.2a/reference/c-function-cmd-queue-c-cmdq_remove/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L447)
- [`control_read_callback`](/en/tmux/3.2a/reference/c-function-control-c-control_read_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L571)
- [`key_bindings_dispatch`](/en/tmux/3.2a/reference/c-function-key_bindings_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/key-bindings.c#L668)
- [`load_cfg`](/en/tmux/3.2a/reference/c-function-load_cfg/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cfg.c#L151)
- [`load_cfg_from_buffer`](/en/tmux/3.2a/reference/c-function-load_cfg_from_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cfg.c#L205)
- [`menu_key_cb`](/en/tmux/3.2a/reference/c-function-menu-c-menu_key_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/menu.c#L340)
- [`mode_tree_run_command`](/en/tmux/3.2a/reference/c-function-mode_tree_run_command/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L1211)
- [`notify_insert_hook`](/en/tmux/3.2a/reference/c-function-notify-c-notify_insert_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/notify.c#L104)

## Calls

- [`format_free`](/en/tmux/3.2a/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L250)

## Referenced by

- [`cmd_parse_from_arguments`](/en/tmux/3.2a/reference/c-function-cmd_parse_from_arguments/) (function)

## Referenced declarations

- [`cmdq_state`](/en/tmux/3.2a/reference/c-struct-cmdq_state/) (struct)
- [`cmdq_state.formats`](/en/tmux/3.2a/reference/c-struct-cmdq_state-formats/) (attribute)
- [`cmdq_state.references`](/en/tmux/3.2a/reference/c-struct-cmdq_state-references/) (attribute)
