OSDN Git Service

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)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Fri, 3 Aug 2018 19:13:08 +0000 (19:13 +0000)
commitc5a7986708aaebba7c8576ea195a6ecb11329c96
treeff67031baaa5aeb3ff232029cdd2248a812b0231
parentbe793f99fa610fd91ecf14c91f4f0cbbfe75aba3
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 98232b084c66368234d19fafe3076bc1c0f1b578)
bta/pan/bta_pan_act.cc
stack/bnep/bnep_main.cc
stack/pan/pan_main.cc