OSDN Git Service

DO NOT MERGE: PAN: Always allocate in bta_pan_data_buf_ind_cback
authorMyles Watson <mylesgw@google.com>
Wed, 21 Mar 2018 23:45:32 +0000 (16:45 -0700)
committerRohit Yengisetty <rngy@google.com>
Wed, 18 Apr 2018 00:47:03 +0000 (17:47 -0700)
commit9f58b5b92316d3e081862927f62bb4049a9a21d6
treeeee8adfd19f197fb30814ea3a6ffb116345ef618
parent530d9e632642387092bc22d182fe2db3a207c0f6
DO NOT MERGE: PAN: Always allocate in bta_pan_data_buf_ind_cback

Change I63b857d031c55d3a0754e4101e330843eb422b2a caused a double
free.  Move the free call to pan_data_buf_ind_cb().

Free the buffer before every return in pan_data_buf_ind_cb.

Bug: 74950468
Test: manual tethering test with DUT sharing its connection
Change-Id: If4526f3042699581e2cdde79a362eef0f83768eb
Merged-In: If4526f3042699581e2cdde79a362eef0f83768eb
(cherry picked from commit 2e0deb1d135805b37697f0e02a55269c6cc500fe)
(cherry picked from commit e04c8be75d115e5d241afe95148e0093ef8c72eb)
bta/pan/bta_pan_act.c
stack/bnep/bnep_main.c
stack/pan/pan_main.c