# cmdq_free_state

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L248
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-cmdq_free_state/

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

## Parameters

- `state` (`struct cmdq_state *`)

## Called by

- [`cmdq_get_command`](/en/tmux/3.7c/reference/c-function-cmdq_get_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L535)
- [`cmdq_insert_hook`](/en/tmux/3.7c/reference/c-function-cmdq_insert_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L441)
- [`cmdq_remove`](/en/tmux/3.7c/reference/c-function-cmd-queue-c-cmdq_remove/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L460)
- [`control_read_callback`](/en/tmux/3.7c/reference/c-function-control-c-control_read_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/control.c#L577)
- [`key_bindings_dispatch`](/en/tmux/3.7c/reference/c-function-key_bindings_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L710)
- [`load_cfg`](/en/tmux/3.7c/reference/c-function-load_cfg/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L147)
- [`load_cfg_from_buffer`](/en/tmux/3.7c/reference/c-function-load_cfg_from_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L199)
- [`menu_key_cb`](/en/tmux/3.7c/reference/c-function-menu_key_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/menu.c#L508)
- [`mode_tree_run_command`](/en/tmux/3.7c/reference/c-function-mode_tree_run_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1485)
- [`notify_insert_hook`](/en/tmux/3.7c/reference/c-function-notify-c-notify_insert_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/notify.c#L119)

## Calls

- [`format_free`](/en/tmux/3.7c/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L254)

## Referenced by

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

## Referenced declarations

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