OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c34c8a
)
Add missing lock protection when freeing RFCOMM port queues
author
Pavlin Radoslavov
<pavlin@google.com>
Sat, 1 Jul 2017 04:25:15 +0000
(21:25 -0700)
committer
Pavlin Radoslavov
<pavlin@google.com>
Thu, 6 Jul 2017 00:12:28 +0000
(
00:12
+0000)
Bug:
63100223
Test: Code compilation
Change-Id: Ibbafb9586e9807688276c9eb2f6399cb3ee487c9
stack/rfcomm/port_utils.cc
patch
|
blob
|
history
diff --git
a/stack/rfcomm/port_utils.cc
b/stack/rfcomm/port_utils.cc
index
a1b23ff
..
4057c9b
100644
(file)
--- a/
stack/rfcomm/port_utils.cc
+++ b/
stack/rfcomm/port_utils.cc
@@
-229,10
+229,13
@@
void port_release_port(tPORT* p_port) {
}
rfc_port_timer_stop(p_port);
+
+ mutex_global_lock();
fixed_queue_free(p_port->tx.queue, NULL);
p_port->tx.queue = NULL;
fixed_queue_free(p_port->rx.queue, NULL);
p_port->rx.queue = NULL;
+ mutex_global_unlock();
if (p_port->keep_port_handle) {
RFCOMM_TRACE_DEBUG("%s Re-initialize handle: %d", __func__, p_port->inx);