From 82a91c91d01ce9b999c8821ed13515883468e203 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 30 Mar 2016 07:01:52 +0200 Subject: Fixing json memory leak. --- test/core/json/fuzzer.c | 7 ++----- test/core/json/json_test.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'test/core/json') diff --git a/test/core/json/fuzzer.c b/test/core/json/fuzzer.c index a62ffebccb..c32ba7912f 100644 --- a/test/core/json/fuzzer.c +++ b/test/core/json/fuzzer.c @@ -67,11 +67,8 @@ void guard_free(void *vptr) { g_old_allocs.free_fn(ptr); } -struct gpr_allocation_functions g_guard_allocs = { - guard_malloc, - guard_realloc, - guard_free -}; +struct gpr_allocation_functions g_guard_allocs = {guard_malloc, guard_realloc, + guard_free}; int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { char *s; diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c index 49bdf377ac..735ff4c853 100644 --- a/test/core/json/json_test.c +++ b/test/core/json/json_test.c @@ -89,7 +89,7 @@ static testing_pair testing_pairs[] = { {"{\"foo\": bar}", NULL}, {"{\"foo\": bar\"x\"}", NULL}, {"fals", NULL}, - {"0,0", NULL}, + {"0,0 ", NULL}, /* Testing unterminated string. */ {"\"\\x", NULL}, /* Testing invalid UTF-16 number. */ -- cgit v1.2.3