aboutsummaryrefslogtreecommitdiff
path: root/slave.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-23 10:54:55 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-23 10:54:55 +0000
commit4e5f5026b8abc4aa2e23a82f3e91196cb09ecabe (patch)
tree75e456ffe40c4c33d2ec8275c646c9204aeae7b5 /slave.c
parentconfig: remove duplicated error logs for invalid colors (diff)
parentconfig: add new function config_clone() (diff)
Merge branch 'config-clone'
Diffstat (limited to 'slave.c')
-rw-r--r--slave.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/slave.c b/slave.c
index 8e800214..ba2d0867 100644
--- a/slave.c
+++ b/slave.c
@@ -293,9 +293,7 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
char **shell_argv = NULL;
if (argc == 0) {
- char *shell_copy = xstrdup(conf_shell);
- if (!tokenize_cmdline(shell_copy, &_shell_argv)) {
- free(shell_copy);
+ if (!tokenize_cmdline(conf_shell, &_shell_argv)) {
(void)!write(fork_pipe[1], &errno, sizeof(errno));
_exit(0);
}