commit | 662be34d67978a549560f74f8a233c4cf5dd4768 | [log] [tgz] |
---|---|---|
author | Hansong Zhang <hsz@google.com> | Thu Oct 08 13:07:36 2020 -0700 |
committer | Hansong Zhang <hsz@google.com> | Fri Oct 09 16:51:44 2020 +0000 |
tree | 9c0197644f367f6d0fc0cd8b19df306e7055ac1e | |
parent | 648dd98e0199f01230053aab43e6fcdb0585efc2 [diff] |
DynamicChannelImpl::Close check if it's closed first Coule be the case where it's closed, but the client called Close() before that. Bug: 167263142 Test: cert/run --host Tag: #gd-refactor Change-Id: I5c74081d38e02ece143d7a7ee46606bed83a5f2d
diff --git a/system/gd/l2cap/internal/dynamic_channel_impl.cc b/system/gd/l2cap/internal/dynamic_channel_impl.cc index 07ebb19..372f753 100644 --- a/system/gd/l2cap/internal/dynamic_channel_impl.cc +++ b/system/gd/l2cap/internal/dynamic_channel_impl.cc
@@ -55,6 +55,10 @@ } void DynamicChannelImpl::Close() { + if (link_ == nullptr) { + LOG_ERROR("Channel is already closed"); + return; + } link_->SendDisconnectionRequest(cid_, remote_cid_); }