# cmd_free

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

```c
void cmd_free(struct cmd *cmd)
```

## Parameters

- `cmd` (`struct cmd *`)

## Called by

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

## Calls

- [`args_free`](/en/tmux/3.2a/reference/c-function-args_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L554)
- [`cmd_free_argv`](/en/tmux/3.2a/reference/c-function-cmd_free_argv/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L550)

## Referenced by

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

## Referenced declarations

- [`cmd.alias`](/en/tmux/3.2a/reference/c-struct-cmd-alias/) (attribute)
- [`cmd.argc`](/en/tmux/3.2a/reference/c-struct-cmd-argc/) (attribute)
- [`cmd.args`](/en/tmux/3.2a/reference/c-struct-cmd-args/) (attribute)
- [`cmd.argv`](/en/tmux/3.2a/reference/c-struct-cmd-argv/) (attribute)
- [`cmd`](/en/tmux/3.2a/reference/c-struct-cmd/) (struct)
- [`cmd.file`](/en/tmux/3.2a/reference/c-struct-cmd-file/) (attribute)
