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:
9089951
)
Fix memory leak in RFCOMM sockets where some lists were not being freed.
author
Sharvil Nanavati
<sharvil@google.com>
Sat, 30 Aug 2014 01:26:23 +0000
(18:26 -0700)
committer
Andre Eisenbach
<eisenbach@google.com>
Mon, 16 Mar 2015 23:51:32 +0000
(16:51 -0700)
btif/src/btif_sock_rfc.c
patch
|
blob
|
history
diff --git
a/btif/src/btif_sock_rfc.c
b/btif/src/btif_sock_rfc.c
index
7ff36cb
..
1c0cbfb
100644
(file)
--- a/
btif/src/btif_sock_rfc.c
+++ b/
btif/src/btif_sock_rfc.c
@@
-117,12
+117,11
@@
void btsock_rfc_cleanup(void) {
pth = -1;
lock_slot(&slot_lock);
- for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i)
- if (rfc_slots[i].id)
{
+ for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i)
{
+ if (rfc_slots[i].id)
cleanup_rfc_slot(&rfc_slots[i]);
- list_free(rfc_slots[i].incoming_queue);
- rfc_slots[i].incoming_queue = NULL;
- }
+ list_free(rfc_slots[i].incoming_queue);
+ }
unlock_slot(&slot_lock);
}