[gRPC-ObjC] Fix potential over releasing crash for grp channel (#27061)

pull/27114/head
Denny C. Dai 4 years ago committed by GitHub
parent 793cb25d4a
commit d10b2a677d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/objective-c/GRPCClient/private/GRPCCore/GRPCChannel.m

@ -291,8 +291,11 @@
}
- (void)dealloc {
if (_unmanagedChannel) {
grpc_channel_destroy(_unmanagedChannel);
@synchronized(self) {
if (_unmanagedChannel) {
grpc_channel_destroy(_unmanagedChannel);
_unmanagedChannel = NULL;
}
}
}

Loading…
Cancel
Save