aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-04-12 08:42:34 +0200
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-04-12 08:42:34 +0200
commit2e1a5ac748ca21e87a012eb2c0d86ec273350389 (patch)
tree1c5833de93cbdafc8145a025e17153159b58d406
parent839cdb51d5521b2792d04a351d864d9c35ab7511 (diff)
Initializing counters before grpc_init, and destroying them after grpc_shutdown.
-rw-r--r--test/core/end2end/fuzzers/server_fuzzer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c
index c82df42ebf..06dc5b8bf3 100644
--- a/test/core/end2end/fuzzers/server_fuzzer.c
+++ b/test/core/end2end/fuzzers/server_fuzzer.c
@@ -51,8 +51,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_test_only_set_metadata_hash_seed(0);
struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);
- grpc_init();
grpc_memory_counters_init();
+ grpc_init();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write);
@@ -120,8 +120,8 @@ done:
grpc_server_destroy(server);
grpc_completion_queue_destroy(cq);
counters = grpc_memory_counters_snapshot();
- grpc_memory_counters_destroy();
grpc_shutdown();
+ grpc_memory_counters_destroy();
GPR_ASSERT(counters.total_size_relative == 0);
return 0;
}