about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-01-06 04:32:07 +0100
committerMikael Magnusson <mikachu@gmail.com>2015-01-06 23:51:00 +0100
commitc425cc9632fc475e3117cf96e69e2510be5d80c0 (patch)
tree559a5a1bcd63b5952604d63b56423b6b1d42a22c /Src/utils.c
parent6a5339fdd517fc59ce576cf3bbd0cd73c0edfa14 (diff)
downloadzsh-c425cc9632fc475e3117cf96e69e2510be5d80c0.tar.gz
zsh-c425cc9632fc475e3117cf96e69e2510be5d80c0.tar.xz
zsh-c425cc9632fc475e3117cf96e69e2510be5d80c0.zip
34108: Don't leak ifs stuff
Found by Coverity (Issue 1255785).
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 390f513ba..72a0c9c1f 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3543,7 +3543,7 @@ inittyptab(void)
     for (t0 = (int)STOUC(Snull); t0 <= (int)STOUC(Nularg); t0++)
 	typtab[t0] |= ITOK | IMETA | INULL;
     for (s = ifs ? ifs : EMULATION(EMULATE_KSH|EMULATE_SH) ?
-	ztrdup(DEFAULT_IFS_SH) : ztrdup(DEFAULT_IFS); *s; s++) {
+	DEFAULT_IFS_SH : DEFAULT_IFS; *s; s++) {
 	int c = STOUC(*s == Meta ? *++s ^ 32 : *s);
 #ifdef MULTIBYTE_SUPPORT
 	if (!isascii(c)) {
@@ -3578,7 +3578,7 @@ inittyptab(void)
 #ifdef MULTIBYTE_SUPPORT
     set_widearray(wordchars, &wordchars_wide);
     set_widearray(ifs ? ifs : EMULATION(EMULATE_KSH|EMULATE_SH) ?
-	ztrdup(DEFAULT_IFS_SH) : ztrdup(DEFAULT_IFS), &ifs_wide);
+	DEFAULT_IFS_SH : DEFAULT_IFS, &ifs_wide);
 #endif
     for (s = SPECCHARS; *s; s++)
 	typtab[STOUC(*s)] |= ISPECIAL;