mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Don't leak name when freeing session, from Kuang-che Wu.
This commit is contained in:
parent
f6a0f8730e
commit
ed2a486f46
@ -189,9 +189,11 @@ 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. */
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user