Don't leak name when freeing session, from Kuang-che Wu.

This commit is contained in:
nicm 2015-08-28 13:16:03 +00:00
parent f6a0f8730e
commit ed2a486f46

View File

@ -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