check before unref, this will fail in BadCreds test

pull/2749/head
yang-g 9 years ago
parent 61c8382fb0
commit 2f04c6e258
  1. 2
      src/core/surface/channel.c

@ -229,7 +229,9 @@ static void destroy_channel(void *p, int ok) {
registered_call *rc = channel->registered_calls; registered_call *rc = channel->registered_calls;
channel->registered_calls = rc->next; channel->registered_calls = rc->next;
GRPC_MDELEM_UNREF(rc->path); GRPC_MDELEM_UNREF(rc->path);
if (rc->authority) {
GRPC_MDELEM_UNREF(rc->authority); GRPC_MDELEM_UNREF(rc->authority);
}
gpr_free(rc); gpr_free(rc);
} }
grpc_mdctx_unref(channel->metadata_context); grpc_mdctx_unref(channel->metadata_context);

Loading…
Cancel
Save