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)
committerMyles Watson <mylesgw@google.com>
Mon, 2 Apr 2018 18:57:46 +0000 (11:57 -0700)
commite04c8be75d115e5d241afe95148e0093ef8c72eb
tree38c08450c4c8d654d81c9592acca6544f56d7a38
parent8a6fb368847794adb2365f91aa60a36a61d02607
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)
bta/pan/bta_pan_act.c
stack/bnep/bnep_main.c
stack/pan/pan_main.c