diff --git a/zephyr/lib/alloc.c b/zephyr/lib/alloc.c index 8bfe3155477d..3cfc6eb97296 100644 --- a/zephyr/lib/alloc.c +++ b/zephyr/lib/alloc.c @@ -257,8 +257,10 @@ static void virtual_heap_free(void *ptr) ptr = (__sparse_force void *)sys_cache_cached_ptr_get(ptr); ret = vmh_free(heap, ptr); - if (ret) + if (ret) { tr_err(&zephyr_tr, "Unable to free %p! %d", ptr, ret); + k_panic(); + } } static const struct vmh_heap_config static_hp_buffers = {