=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/session.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/tmux/session.c 2009/11/26 21:37:13 1.14 --- src/usr.bin/tmux/session.c 2009/12/03 22:50:10 1.15 *************** *** 1,4 **** ! /* $OpenBSD: session.c,v 1.14 2009/11/26 21:37:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: session.c,v 1.15 2009/12/03 22:50:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 165,171 **** s->name = xstrdup(name); else xasprintf(&s->name, "%u", i); ! if (cmd != NULL) { if (session_new(s, NULL, cmd, cwd, idx, cause) == NULL) { session_destroy(s); --- 165,171 ---- s->name = xstrdup(name); else xasprintf(&s->name, "%u", i); ! if (cmd != NULL) { if (session_new(s, NULL, cmd, cwd, idx, cause) == NULL) { session_destroy(s); *************** *** 208,214 **** winlink_remove(&s->windows, RB_ROOT(&s->windows)); xfree(s->name); ! for (i = 0; i < ARRAY_LENGTH(&dead_sessions); i++) { if (ARRAY_ITEM(&dead_sessions, i) == NULL) { ARRAY_SET(&dead_sessions, i, s); --- 208,214 ---- winlink_remove(&s->windows, RB_ROOT(&s->windows)); xfree(s->name); ! for (i = 0; i < ARRAY_LENGTH(&dead_sessions); i++) { if (ARRAY_ITEM(&dead_sessions, i) == NULL) { ARRAY_SET(&dead_sessions, i, s); *************** *** 233,239 **** /* Create a new window on a session. */ struct winlink * ! session_new(struct session *s, const char *name, const char *cmd, const char *cwd, int idx, char **cause) { struct window *w; --- 233,239 ---- /* Create a new window on a session. */ struct winlink * ! session_new(struct session *s, const char *name, const char *cmd, const char *cwd, int idx, char **cause) { struct window *w; *************** *** 463,469 **** /* * Add a session to the session group containing target, creating it if ! * necessary. */ void session_group_add(struct session *target, struct session *s) --- 463,469 ---- /* * Add a session to the session group containing target, creating it if ! * necessary. */ void session_group_add(struct session *target, struct session *s)