projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Introduced wrapper macros snew(), snewn() and sresize() for the
[u/mdw/putty]
/
unix
/
pty.c
diff --git
a/unix/pty.c
b/unix/pty.c
index
63fe69e
..
6d90abb
100644
(file)
--- a/
unix/pty.c
+++ b/
unix/pty.c
@@
-498,7
+498,7
@@
static char *pty_init(void *frontend, void **backend_handle, Config *cfg,
char *shellname;
if (cfg->login_shell) {
char *p = strrchr(shell, '/');
- shellname = s
malloc(2+strlen(shell)
);
+ shellname = s
newn(2+strlen(shell), char
);
p = p ? p+1 : shell;
sprintf(shellname, "-%s", p);
} else