mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Fix a couple of memory leaks, one when creating a new pane and one when
adding formats onto the queue item.
This commit is contained in:
@ -243,8 +243,12 @@ cmdq_copy_state(struct cmdq_state *state)
|
||||
void
|
||||
cmdq_free_state(struct cmdq_state *state)
|
||||
{
|
||||
if (--state->references == 0)
|
||||
free(state);
|
||||
if (--state->references != 0)
|
||||
return;
|
||||
|
||||
if (state->formats != NULL)
|
||||
format_free(state->formats);
|
||||
free(state);
|
||||
}
|
||||
|
||||
/* Add a format to command queue. */
|
||||
|
Reference in New Issue
Block a user