adb: add lock to remove_socket.
The comment that was previously here says that local_socket_list_lock
must be taken, but this function is exposed to external callers that
can't possibly take the lock.
Bug: http://b/65419665
Bug: 64709603 (presubmit balking at the line above)
Test: python test_device.py
Change-Id: I12d464933936b2a210a827ccf19ea201020d8d78
(cherry picked from commit 62c92f0c05
)
This commit is contained in:
parent
c78ecca70b
commit
2b933918fc
|
@ -96,7 +96,7 @@ void install_local_socket(asocket* s) {
|
|||
}
|
||||
|
||||
void remove_socket(asocket* s) {
|
||||
// socket_list_lock should already be held
|
||||
std::lock_guard<std::recursive_mutex> lock(local_socket_list_lock);
|
||||
if (s->prev && s->next) {
|
||||
s->prev->next = s->next;
|
||||
s->next->prev = s->prev;
|
||||
|
|
Loading…
Reference in New Issue