Merge pull request #9631 from ctiller/no_no_error

Save allocating a grpc_error if there is no error
pull/9636/head
Craig Tiller 8 years ago committed by GitHub
commit 4087712730
  1. 2
      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, "");
}

Loading…
Cancel
Save