From 05fce429e2a6503a839ac2a7f6854dafc6d188e9 Mon Sep 17 00:00:00 2001 From: David Klempner Date: Wed, 4 Feb 2015 14:40:42 -0800 Subject: [PATCH] Fix a memory leak and a gpr_strdup/free mismatch in json_test --- test/core/json/json_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c index 11659a57161..6d0227ad39b 100644 --- a/test/core/json/json_test.c +++ b/test/core/json/json_test.c @@ -151,7 +151,7 @@ static void test_pairs() { GPR_ASSERT(!json); } - free(scratchpad); + gpr_free(scratchpad); } } @@ -166,6 +166,7 @@ static void test_atypical() { grpc_json_destroy(json->child); json->child = brother; grpc_json_destroy(json); + gpr_free(scratchpad); } int main(int argc, char **argv) {