diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index eb0185a8e35..b96fc1f0642 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3282,12 +3282,16 @@ memory_full (size_t nbytes) int enough_free_memory = 0; if (SPARE_MEMORY < nbytes) { - void *p = malloc (SPARE_MEMORY); + void *p; + + MALLOC_BLOCK_INPUT; + p = malloc (SPARE_MEMORY); if (p) { free (p); enough_free_memory = 1; } + MALLOC_UNBLOCK_INPUT; } if (! enough_free_memory) |
