Skip to content
Snippets Groups Projects
Commit 05fce429 authored by David Klempner's avatar David Klempner
Browse files

Fix a memory leak and a gpr_strdup/free mismatch in json_test

parent 034152f5
No related branches found
No related tags found
No related merge requests found
...@@ -151,7 +151,7 @@ static void test_pairs() { ...@@ -151,7 +151,7 @@ static void test_pairs() {
GPR_ASSERT(!json); GPR_ASSERT(!json);
} }
free(scratchpad); gpr_free(scratchpad);
} }
} }
...@@ -166,6 +166,7 @@ static void test_atypical() { ...@@ -166,6 +166,7 @@ static void test_atypical() {
grpc_json_destroy(json->child); grpc_json_destroy(json->child);
json->child = brother; json->child = brother;
grpc_json_destroy(json); grpc_json_destroy(json);
gpr_free(scratchpad);
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment