fix param passed to assert_valid_block, should be block not ptr

pull/8467/head
jingli 2022-02-24 13:50:16 +08:00
rodzic 66593bf140
commit 6c25dd4ec1
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -205,7 +205,7 @@ void multi_heap_free_impl(multi_heap_handle_t heap, void *p)
return;
}
assert_valid_block(heap, p);
assert_valid_block(heap, block_from_ptr(p));
multi_heap_internal_lock(heap);
heap->free_bytes += tlsf_block_size(p);
@ -221,7 +221,7 @@ void *multi_heap_realloc_impl(multi_heap_handle_t heap, void *p, size_t size)
return multi_heap_malloc_impl(heap, size);
}
assert_valid_block(heap, p);
assert_valid_block(heap, block_from_ptr(p));
if (heap == NULL) {
return NULL;