about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c6
-rw-r--r--Src/jobs.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 67d48b1ce..004459abf 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -931,11 +931,7 @@ entersubsh(int flags)
     zsh_subshell++;
     if ((flags & ESUB_REVERTPGRP) && getpid() == mypgrp)
 	release_pgrp();
-    if (SHTTY != -1) {
-	shout = NULL;
-	zclose(SHTTY);
-	SHTTY = -1;
-    }
+    shout = NULL;
     if (isset(MONITOR)) {
 	signal_default(SIGTTOU);
 	signal_default(SIGTTIN);
diff --git a/Src/jobs.c b/Src/jobs.c
index 6c673b74a..8e48ed4b8 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1307,7 +1307,8 @@ clearjobtab(int monitor)
 
     if (monitor && oldmaxjob) {
 	int sz = oldmaxjob * sizeof(struct job);
-	DPUTS(oldjobtab != NULL, "BUG: saving job table twice\n");
+	if (oldjobtab)
+	    free(oldjobtab);
 	oldjobtab = (struct job *)zalloc(sz);
 	memcpy(oldjobtab, jobtab, sz);