aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-02-08 23:48:04 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-02-08 23:48:04 +0000
commit03af9f7be3396beade7edf7df9753d9a07787d89 (patch)
tree1cd80389845908b5067becad5903b1553cd29507
parent15470e2468438556f749093db90be95408160266 (diff)
parent2eedc09686db775d88cf074e6e459c6d232c262b (diff)
downloadbt-android11-mainline-os-statsd-release.tar.gz
Snap for 7132927 from 2eedc09686db775d88cf074e6e459c6d232c262b to mainline-os-statsd-releaseandroid-mainline-11.0.0_r44android11-mainline-os-statsd-release
Change-Id: I7ed6c4e9e9c5e4dace7821db88cc0aba358d967b
-rw-r--r--stack/avrc/avrc_api.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/stack/avrc/avrc_api.cc b/stack/avrc/avrc_api.cc
index 62b7fe478..4565b507a 100644
--- a/stack/avrc/avrc_api.cc
+++ b/stack/avrc/avrc_api.cc
@@ -237,7 +237,7 @@ static uint8_t* avrc_get_data_ptr(BT_HDR* p_pkt) {
static BT_HDR* avrc_copy_packet(BT_HDR* p_pkt, int rsp_pkt_len) {
const int offset = MAX(AVCT_MSG_OFFSET, p_pkt->offset);
const int pkt_len = MAX(rsp_pkt_len, p_pkt->len);
- BT_HDR* p_pkt_copy = (BT_HDR*)osi_malloc(BT_HDR_SIZE + offset + pkt_len);
+ BT_HDR* p_pkt_copy = (BT_HDR*)osi_calloc(BT_HDR_SIZE + offset + pkt_len);
/* Copy the packet header, set the new offset, and copy the payload */
memcpy(p_pkt_copy, p_pkt, BT_HDR_SIZE);