* libguile/weak-table.c (resize_table): Move 'allocate_entries' call
outside of the loop.
---
 libguile/weak-table.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libguile/weak-table.c b/libguile/weak-table.c
index a0bebca5e..1aa2a0fcc 100644
--- a/libguile/weak-table.c
+++ b/libguile/weak-table.c
@@ -476,10 +476,11 @@ resize_table (scm_t_weak_table *table)
       if (new_size_index == table->size_index)
         return;
       new_size = hashtable_size[new_size_index];
-      new_entries = allocate_entries (new_size, table->kind);
     }
   while (!is_acceptable_size_index (table, new_size_index));
 
+  new_entries = allocate_entries (new_size, table->kind);
+
   old_entries = table->entries;
   old_size = table->size;
   
-- 
2.14.2




Reply via email to