aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-02-07 14:52:59 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-02-07 14:52:59 -0800
commit8c58a489a2cf8f81299d97a082995cb77eb0bc52 (patch)
tree23cea5cbf8ed51be2ef83c1d7869c2ddfd50995b
parent547974e47857e2b5099a4d16b17f271a4cb88ca1 (diff)
Save allocating a grpc_error if there is no error
-rw-r--r--src/core/lib/surface/call.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index 70bab4c079..7f1410a085 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, "");
}