mirror of
https://github.com/tmate-io/tmate.git
synced 2026-07-30 06:10:02 +00:00
Don't leak name when freeing session, from Kuang-che Wu.
This commit is contained in:
parent
f6a0f8730e
commit
ed2a486f46
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
if (s->references == 0)
|
||||
if (s->references == 0) {
|
||||
free(s->name);
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
|
||||
/* Destroy a session. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue