Skip to content
Snippets Groups Projects
Commit 2f04c6e2 authored by yang-g's avatar yang-g
Browse files

check before unref, this will fail in BadCreds test

parent 61c8382f
No related branches found
No related tags found
No related merge requests found
...@@ -229,7 +229,9 @@ static void destroy_channel(void *p, int ok) { ...@@ -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);
GRPC_MDELEM_UNREF(rc->authority); if (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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment