summaryrefslogtreecommitdiffstatshomepage
path: root/py/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/gc.c')
-rw-r--r--py/gc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/gc.c b/py/gc.c
index 24d8e1ac26..8e7130798f 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -484,7 +484,11 @@ void gc_free(void *ptr_in) {
#if EXTENSIVE_HEAP_PROFILING
gc_dump_alloc_table();
#endif
+ } else {
+ assert(!"bad free");
}
+ } else if (ptr_in != NULL) {
+ assert(!"bad free");
}
}