aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-01-21 15:12:24 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-01-21 15:12:24 -0800
commitf28ca8ea22ec19d490129e49967024110bb3c463 (patch)
tree5bd88b2a862f43716cecaf6e1ff9b136738842db /test
parent4c26fdfe10be53a43da378eb1264e944b97ee730 (diff)
Fix api_fuzzer
Diffstat (limited to 'test')
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c
index 30d814b01b..e0125b293d 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.c
+++ b/test/core/end2end/fuzzers/api_fuzzer.c
@@ -611,6 +611,7 @@ static call_state *maybe_delete_call_state(call_state *call) {
grpc_slice_unref(call->slices_to_unref[i]);
}
gpr_free(call->to_free);
+ gpr_free(call->slices_to_unref);
gpr_free(call);
@@ -633,8 +634,8 @@ static grpc_slice *add_to_slice_unref(call_state *call, grpc_slice s) {
gpr_realloc(call->slices_to_unref,
sizeof(*call->slices_to_unref) * call->cap_slices_to_unref);
}
- call->slices_to_unref[call->num_to_free++] = s;
- return &call->slices_to_unref[call->num_to_free - 1];
+ call->slices_to_unref[call->num_slices_to_unref++] = s;
+ return &call->slices_to_unref[call->num_slices_to_unref - 1];
}
static void read_metadata(input_stream *inp, size_t *count,