about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2023-09-10 21:00:23 -0700
committerBart Schaefer <schaefer@zsh.org>2023-09-10 21:00:23 -0700
commit96ce0abf6b7607ca2df64759c495d153132d07bd (patch)
treed9ca5f807b28ba10cc9976fe31ded1d1f38dcac3 /Src/exec.c
parentd95197a2ec43c79958aaf198189d4f138422a331 (diff)
downloadzsh-96ce0abf6b7607ca2df64759c495d153132d07bd.tar.gz
zsh-96ce0abf6b7607ca2df64759c495d153132d07bd.tar.xz
zsh-96ce0abf6b7607ca2df64759c495d153132d07bd.zip
52125: getoutput() must not free() after gettempname(..., 1) for heap
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 8f9d5a885..3a8b3e951 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4897,7 +4897,6 @@ getoutputfile(char *cmd, char **eptr)
 
     if ((fd = open(nam, O_WRONLY | O_CREAT | O_EXCL | O_NOCTTY, 0600)) < 0) {
 	zerr("process substitution failed: %e", errno);
-	free(nam);
 	if (!s)
 	    child_unblock();
 	return NULL;