mirror of
https://github.com/tmux/tmux.git
synced 2024-11-04 18:08:48 +00:00
Don't leak name when freeing session, from Kuang-che Wu.
This commit is contained in:
parent
f6a0f8730e
commit
ed2a486f46
@ -189,8 +189,10 @@ session_free(unused int fd, unused short events, void *arg)
|
|||||||
|
|
||||||
log_debug("sesson %s freed (%d references)", s->name, s->references);
|
log_debug("sesson %s freed (%d references)", s->name, s->references);
|
||||||
|
|
||||||
if (s->references == 0)
|
if (s->references == 0) {
|
||||||
|
free(s->name);
|
||||||
free(s);
|
free(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Destroy a session. */
|
/* Destroy a session. */
|
||||||
|
Loading…
Reference in New Issue
Block a user