summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/mem.c9
1 files changed, 7 insertions, 2 deletions
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;