Fix leaks in server fuzzer

pull/6897/head
Craig Tiller 9 years ago
parent 375a3a60c3
commit 8e5c934d6f
  1. 3
      src/core/lib/channel/http_server_filter.c
  2. 5
      src/core/lib/surface/server.c

@ -182,8 +182,11 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data,
/* Error this call out */
grpc_call_element_send_cancel(exec_ctx, elem);
}
} else {
GRPC_ERROR_REF(err);
}
calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, err);
GRPC_ERROR_UNREF(err);
}
static void hs_mutate_op(grpc_call_element *elem,

@ -719,6 +719,7 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr,
call_data *calld = elem->call_data;
gpr_timespec op_deadline;
GRPC_ERROR_REF(error);
grpc_metadata_batch_filter(calld->recv_initial_metadata, server_filter, elem);
op_deadline = calld->recv_initial_metadata->deadline;
if (0 != gpr_time_cmp(op_deadline, gpr_inf_future(op_deadline.clock_type))) {
@ -727,12 +728,12 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr,
if (calld->host && calld->path) {
/* do nothing */
} else {
GRPC_ERROR_UNREF(error);
error =
GRPC_ERROR_CREATE_REFERENCING("Missing :authority or :path", &error, 1);
}
calld->on_done_recv_initial_metadata->cb(
exec_ctx, calld->on_done_recv_initial_metadata->cb_arg, error);
grpc_exec_ctx_push(exec_ctx, calld->on_done_recv_initial_metadata, error, NULL);
}
static void server_mutate_op(grpc_call_element *elem,

Loading…
Cancel
Save