Handle empty or unset TERM correctly; also fix a fatal() message while here.

This commit is contained in:
Nicholas Marriott
2009-07-07 17:24:32 +00:00
parent 9ced016cbc
commit 474fdebb7a
2 changed files with 5 additions and 3 deletions

View File

@ -211,7 +211,9 @@ server_msg_fn_identify(struct hdr *hdr, struct client *c)
c->tty.term_flags |= TERM_88COLOURS;
if (data.flags & IDENTIFY_HASDEFAULTS)
c->tty.term_flags |= TERM_HASDEFAULTS;
xfree(term);
if (term != NULL)
xfree(term);
c->flags |= CLIENT_TERMINAL;