From 9de273d9fb99b9f612b8acd50e09225f60444363 Mon Sep 17 00:00:00 2001 From: Sharvil Nanavati Date: Fri, 31 Jul 2015 14:22:08 -0700 Subject: [PATCH] Fix CTS Verifier test for insecure RFCOMM connection. Closing an RFCOMM server socket does not remove the corresponding service record from the security database. However, the RFCOMM channel becomes free for reuse. The next RFCOMM server socket will therefore "inherit" the service record for the closed one if it happens to reuse the same channel. Bug: 22880207 Change-Id: Ida3fee49e5f40667d9992dc4c4442f9289adae9e --- bta/jv/bta_jv_act.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bta/jv/bta_jv_act.c b/bta/jv/bta_jv_act.c index b7ea75165..2ad86a132 100644 --- a/bta/jv/bta_jv_act.c +++ b/bta/jv/bta_jv_act.c @@ -379,6 +379,9 @@ static tBTA_JV_STATUS bta_jv_free_rfc_cb(tBTA_JV_RFC_CB *p_cb, tBTA_JV_PCB *p_pc p_cb->handle = 0; p_cb->curr_sess = -1; } + if (remove_server) { + bta_jv_free_sec_id(&p_cb->sec_id); + } } return status; } -- 2.11.0