# control_free_sub

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L203
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-control-c-control_free_sub/

```c
static void control_free_sub(struct control_state *cs, struct control_sub *csub)
```

## Parameters

- `cs` (`struct control_state *`)
- `csub` (`struct control_sub *`)

## Called by

- [`control_add_sub`](/en/tmux/3.2a/reference/c-function-control_add_sub/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L1077)
- [`control_remove_sub`](/en/tmux/3.2a/reference/c-function-control_remove_sub/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L1104)
- [`control_stop`](/en/tmux/3.2a/reference/c-function-control_stop/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L820)

## Referenced declarations

- [`control_state`](/en/tmux/3.2a/reference/c-struct-control_state/) (struct)
- [`control_sub`](/en/tmux/3.2a/reference/c-struct-control_sub/) (struct)
- [`control_sub.format`](/en/tmux/3.2a/reference/c-struct-control_sub-format/) (attribute)
- [`control_sub.last`](/en/tmux/3.2a/reference/c-struct-control_sub-last/) (attribute)
- [`control_sub.name`](/en/tmux/3.2a/reference/c-struct-control_sub-name/) (attribute)
- [`control_sub.panes`](/en/tmux/3.2a/reference/c-struct-control_sub-panes/) (attribute)
- [`control_state.subs`](/en/tmux/3.2a/reference/c-struct-control_state-subs/) (attribute)
- [`control_sub.windows`](/en/tmux/3.2a/reference/c-struct-control_sub-windows/) (attribute)
