From 81fa9fd25a57ebaf7e242bc678a6fd179bbdb718 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 26 Oct 2015 14:27:26 -0700 Subject: 36906: quite_signals() in ZSH_MEM realloc() --- Src/mem.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Src') diff --git a/Src/mem.c b/Src/mem.c index 3138bb1d5..62d18d0cd 100644 --- a/Src/mem.c +++ b/Src/mem.c @@ -1668,8 +1668,13 @@ realloc(MALLOC_RET_T p, MALLOC_ARG_T size) int i, l = 0; /* some system..., see above */ - if (!p && size) - return (MALLOC_RET_T) malloc(size); + if (!p && size) { + queue_signals(); + r = malloc(size); + unqueue_signals(); + return (MALLOC_RET_T) r; + } + /* and some systems even do this... */ if (!p || !size) return (MALLOC_RET_T) p; -- cgit 1.4.1