summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index c0a55e61b97..b86ed4ed262 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6101,11 +6101,13 @@ garbage_collect (void)
gc_in_progress = 0;
- unblock_input ();
-
consing_until_gc = gc_threshold
= consing_threshold (gc_cons_threshold, Vgc_cons_percentage, 0);
+ /* Unblock *after* re-setting `consing_until_gc` in case `unblock_input`
+ signals an error (see bug#43389). */
+ unblock_input ();
+
if (garbage_collection_messages && NILP (Vmemory_full))
{
if (message_p || minibuf_level > 0)