summary refs log tree commit diff
path: root/Src/Modules/curses.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-09-12 09:53:39 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-09-12 09:53:39 -0700
commit6ff0628182ac74bbf22dc02edcc9a148f12767db (patch)
tree90230ef04de156abdffc215e201d93666e75596e /Src/Modules/curses.c
parent8b1676e3b7bca183fea725d38d62350d2688078b (diff)
downloadzsh-6ff0628182ac74bbf22dc02edcc9a148f12767db.tar.gz
zsh-6ff0628182ac74bbf22dc02edcc9a148f12767db.tar.xz
zsh-6ff0628182ac74bbf22dc02edcc9a148f12767db.zip
36509: allocate hash table nodes with zshcalloc() to avoid garbage flag values
Diffstat (limited to 'Src/Modules/curses.c')
-rw-r--r--Src/Modules/curses.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index 0054aef52..64329f643 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -370,7 +370,7 @@ zcurses_colorget(const char *nam, char *colorpair)
 	    return NULL;
 	}
 
-	cpn = (Colorpairnode)zalloc(sizeof(struct colorpairnode));
+	cpn = (Colorpairnode)zshcalloc(sizeof(struct colorpairnode));
 	
 	if (!cpn) {
 	    zsfree(cp);
@@ -462,7 +462,7 @@ zccmd_init(const char *nam, char **args)
 	    use_default_colors();
 #endif
 	    /* Initialise the default color pair, always 0 */
-	    cpn = (Colorpairnode)zalloc(sizeof(struct colorpairnode));
+	    cpn = (Colorpairnode)zshcalloc(sizeof(struct colorpairnode));
 	    if (cpn) {
 		cpn->colorpair = 0;
 		addhashnode(zcurses_colorpairs,