=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/session.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- src/usr.bin/tmux/session.c 2012/07/08 07:27:32 1.35 +++ src/usr.bin/tmux/session.c 2012/07/10 11:53:01 1.36 @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.35 2012/07/08 07:27:32 nicm Exp $ */ +/* $OpenBSD: session.c,v 1.36 2012/07/10 11:53:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -126,8 +126,7 @@ s->name = NULL; do { s->idx = next_session++; - if (s->name != NULL) - xfree (s->name); + free (s->name); xasprintf(&s->name, "%u", s->idx); } while (RB_FIND(sessions, &sessions, s) != NULL); } @@ -157,8 +156,7 @@ RB_REMOVE(sessions, &sessions, s); notify_session_closed(s); - if (s->tio != NULL) - xfree(s->tio); + free(s->tio); session_group_remove(s); environ_free(&s->environ); @@ -172,7 +170,7 @@ winlink_remove(&s->windows, wl); } - xfree(s->cwd); + free(s->cwd); RB_INSERT(sessions, &dead_sessions, s); } @@ -495,7 +493,7 @@ TAILQ_REMOVE(&sg->sessions, TAILQ_FIRST(&sg->sessions), gentry); if (TAILQ_EMPTY(&sg->sessions)) { TAILQ_REMOVE(&session_groups, sg, entry); - xfree(sg); + free(sg); } }