aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.c4
-rw-r--r--test/core/util/passthru_endpoint.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c
index b750780a95..c1c5966801 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.c
+++ b/test/core/end2end/fuzzers/api_fuzzer.c
@@ -138,7 +138,9 @@ static uint32_t read_uint32(input_stream *inp) {
static grpc_byte_buffer *read_message(input_stream *inp) {
gpr_slice slice = gpr_slice_malloc(read_uint22(inp));
memset(GPR_SLICE_START_PTR(slice), 0, GPR_SLICE_LENGTH(slice));
- return grpc_raw_byte_buffer_create(&slice, 1);
+ grpc_byte_buffer *out = grpc_raw_byte_buffer_create(&slice, 1);
+ gpr_slice_unref(slice);
+ return out;
}
static void read_metadata(input_stream *inp, size_t *count,
diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c
index 156c666044..c7bcd2de7b 100644
--- a/test/core/util/passthru_endpoint.c
+++ b/test/core/util/passthru_endpoint.c
@@ -148,6 +148,7 @@ static void half_init(half *m, passthru_endpoint *parent) {
void grpc_passthru_endpoint_create(grpc_endpoint **client,
grpc_endpoint **server) {
passthru_endpoint *m = gpr_malloc(sizeof(*m));
+ m->halves = 2;
half_init(&m->client, m);
half_init(&m->server, m);
gpr_mu_init(&m->mu);