aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-12-09 15:56:50 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-12-09 15:56:50 -0800
commit69153e020d1975b93d78df6fc4d1c47e2ed7eb5e (patch)
treefbb1a34faf350682c408998aed79a961d19e9256
parent9e90d22ab7e429f23f740ae56445910678642e75 (diff)
Fix memory leak
-rw-r--r--src/core/lib/surface/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c
index 72ec48f4d9..ddcd8265cd 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.c
@@ -765,12 +765,14 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr,
if (calld->host_set && calld->path_set) {
/* do nothing */
} else {
- GRPC_ERROR_UNREF(error);
+ grpc_error *src_error = error;
error =
GRPC_ERROR_CREATE_REFERENCING("Missing :authority or :path", &error, 1);
+ GRPC_ERROR_UNREF(src_error);
}
grpc_closure_run(exec_ctx, calld->on_done_recv_initial_metadata, error);
+ GRPC_ERROR_UNREF(error);
}
static void server_mutate_op(grpc_call_element *elem,