aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-19 17:09:13 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-19 17:09:13 -0700
commit347e9f930832b38cc0c0519877ee3196f878a0d0 (patch)
tree872daccc772536211ccaedb03b794b7456f16791 /src/core/ext
parent36cce53680f5c0a3d68ce2f3d04cef8eeac3b36d (diff)
Dont crash retrieving peers of cancelled calls
Diffstat (limited to 'src/core/ext')
-rw-r--r--src/core/ext/client_config/subchannel_call_holder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c
index 3db462b246..9918fbdcb4 100644
--- a/src/core/ext/client_config/subchannel_call_holder.c
+++ b/src/core/ext/client_config/subchannel_call_holder.c
@@ -252,9 +252,9 @@ char *grpc_subchannel_call_holder_get_peer(
grpc_exec_ctx *exec_ctx, grpc_subchannel_call_holder *holder) {
grpc_subchannel_call *subchannel_call = GET_CALL(holder);
- if (subchannel_call) {
- return grpc_subchannel_call_get_peer(exec_ctx, subchannel_call);
- } else {
+ if (subchannel_call == NULL || subchannel_call == CANCELLED_CALL) {
return NULL;
+ } else {
+ return grpc_subchannel_call_get_peer(exec_ctx, subchannel_call);
}
}