diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/core/json/fuzzer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/core/json/fuzzer.c b/test/core/json/fuzzer.c index 9f430a0dca..7fe9f72776 100644 --- a/test/core/json/fuzzer.c +++ b/test/core/json/fuzzer.c @@ -44,26 +44,26 @@ static gpr_allocation_functions g_old_allocs; void *guard_malloc(size_t size) { size_t *ptr; g_total_size += size; - ptr = g_old_allocs.malloc(size + sizeof(size)); + ptr = g_old_allocs.malloc_fn(size + sizeof(size)); *ptr++ = size; return ptr; } -void *guard_realloc(void *ptr, size_t size) { +void *guard_realloc(void *vptr, size_t size) { size_t *ptr = vptr; --ptr; g_total_size -= *ptr; - ptr = g_old_allocs.realloc(ptr, size + sizeof(size)); + ptr = g_old_allocs.realloc_fn(ptr, size + sizeof(size)); g_total_size += size; *ptr++ = size; return ptr; } -void *guard_free(void *vptr) { +void guard_free(void *vptr) { size_t *ptr = vptr; --ptr; g_total_size -= *ptr; - g_old_allocs.free(ptr); + g_old_allocs.free_fn(ptr); } struct gpr_allocation_functions g_guard_allocs = { |