Merge branch 'obsd-master'

pull/2378/head
Thomas Adam 2020-09-03 14:01:18 +01:00
commit 2e931d4994
1 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ cmd_attach_session(struct cmdq_item *item, const char *tflag, int dflag,
struct session *s;
struct winlink *wl;
struct window_pane *wp;
char *cause;
char *cwd, *cause;
enum msgtype msgtype;
if (RB_EMPTY(&sessions)) {
@ -99,8 +99,9 @@ cmd_attach_session(struct cmdq_item *item, const char *tflag, int dflag,
}
if (cflag != NULL) {
cwd = format_single(item, cflag, c, s, wl, wp);
free((void *)s->cwd);
s->cwd = format_single(item, cflag, c, s, wl, wp);
s->cwd = cwd;
}
if (fflag)
server_client_set_flags(c, fflag);