From 8c58a489a2cf8f81299d97a082995cb77eb0bc52 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 7 Feb 2017 14:52:59 -0800 Subject: [PATCH] Save allocating a grpc_error if there is no error --- src/core/lib/surface/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 70bab4c0796..7f1410a0856 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -897,7 +897,7 @@ static void recv_common_filter(grpc_exec_ctx *exec_ctx, grpc_call *call, error = grpc_error_set_str(error, GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); grpc_metadata_batch_remove(exec_ctx, b, b->idx.named.grpc_message); - } else { + } else if (error != GRPC_ERROR_NONE) { error = grpc_error_set_str(error, GRPC_ERROR_STR_GRPC_MESSAGE, ""); }