Call gc_free in gc_realloc after allocating new block.
diff --git a/py/gc.c b/py/gc.c
index 7d4f476..690503d 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -329,8 +329,10 @@
     if (n_bytes <= n_existing) {
         return ptr;
     } else {
+        // TODO check if we can grow inplace
         void *ptr2 = gc_alloc(n_bytes);
         memcpy(ptr2, ptr, n_existing);
+        gc_free(ptr);
         return ptr2;
     }
 }