diff --git a/src/objective-c/GRPCClient/private/ChannelArgsUtil.m b/src/objective-c/GRPCClient/private/ChannelArgsUtil.m index b8342a79e79..d9e44b557d1 100644 --- a/src/objective-c/GRPCClient/private/ChannelArgsUtil.m +++ b/src/objective-c/GRPCClient/private/ChannelArgsUtil.m @@ -31,7 +31,7 @@ static void *copy_pointer_arg(void *p) { static void destroy_pointer_arg(void *p) { // Decrease ref count to the object when destroying - CFRelease((CFTreeRef)p); + CFRelease((CFTypeRef)p); } static int cmp_pointer_arg(void *p, void *q) { return p == q; } @@ -52,7 +52,7 @@ void GRPCFreeChannelArgs(grpc_channel_args *channel_args) { } grpc_channel_args *GRPCBuildChannelArgs(NSDictionary *dictionary) { - if (!dictionary) { + if (dictionary.count == 0) { return NULL; }