aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-03-26 01:33:34 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-03-26 01:33:34 +0100
commit7c9a154803c0293a8c0b51bbec65dc00a950989e (patch)
tree86c1ae0a49af8c8e828644f0fb36c701531e276d /test/core/support
parentf3d76384351039266e250aacf97c90d5b0c07dca (diff)
Sanitize mallocs and frees.
Diffstat (limited to 'test/core/support')
-rw-r--r--test/core/support/alloc_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/support/alloc_test.c b/test/core/support/alloc_test.c
index e2d0c16b41..7eaf7a14f3 100644
--- a/test/core/support/alloc_test.c
+++ b/test/core/support/alloc_test.c
@@ -46,7 +46,7 @@ static void fake_free(void *addr) {
static void test_custom_allocs() {
const gpr_allocation_functions default_fns = gpr_get_allocation_functions();
intptr_t addr_to_free = 0;
- int *i;
+ char *i;
gpr_allocation_functions fns = {fake_malloc, fake_realloc, fake_free};
gpr_set_allocation_functions(fns);
@@ -58,7 +58,7 @@ static void test_custom_allocs() {
/* Restore and check we don't get funky values and that we don't leak */
gpr_set_allocation_functions(default_fns);
- GPR_ASSERT((void *)1 != (i = gpr_malloc(sizeof(*i))));
+ GPR_ASSERT((void *)sizeof(*i) != (i = gpr_malloc(sizeof(*i))));
GPR_ASSERT((void *)2 != (i = gpr_realloc(i, 2)));
gpr_free(i);
}