aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-15 13:27:40 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-15 13:27:40 -0700
commit41703589dc200c475765300e10dd5e8995234776 (patch)
tree04d168b03e0d616a4e6970991d7b10478e1a0e67 /test/core/end2end
parent2ca75bf16818e83e936df7365e167904a6647b96 (diff)
Fix leaks
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c
index e5b81e358b..8e1d4195f1 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.c
+++ b/test/core/end2end/fuzzers/api_fuzzer.c
@@ -652,12 +652,20 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
op = &ops[i];
switch (op->op) {
case GRPC_OP_SEND_INITIAL_METADATA:
+ for (size_t j = 0; j < op->data.send_initial_metadata.count; j++) {
+ gpr_free((void*)op->data.send_initial_metadata.metadata[j].key);
+ gpr_free((void*)op->data.send_initial_metadata.metadata[j].value);
+ }
gpr_free(op->data.send_initial_metadata.metadata);
break;
case GRPC_OP_SEND_MESSAGE:
grpc_byte_buffer_destroy(op->data.send_message);
break;
case GRPC_OP_SEND_STATUS_FROM_SERVER:
+ for (size_t j = 0; j < op->data.send_status_from_server.trailing_metadata_count; j++) {
+ gpr_free((void*)op->data.send_status_from_server.trailing_metadata[j].key);
+ gpr_free((void*)op->data.send_status_from_server.trailing_metadata[j].value);
+ }
gpr_free(op->data.send_status_from_server.trailing_metadata);
gpr_free((void*)op->data.send_status_from_server.status_details);
break;