summaryrefslogtreecommitdiffstats
path: root/src/hardware.c
diff options
context:
space:
mode:
authorDmitry Grinberg <dmitrygr@gmail.com>2015-10-10 10:10:11 +0000
committerScott Warner <Tortel1210@gmail.com>2015-10-22 08:33:00 -0400
commitd58c13fb25e3ca93dcda915460600bdee6740751 (patch)
tree4ce71e1f919cfd236d7f063d6dbee5690e26c9b1 /src/hardware.c
parent05573c7e251ee1dca3ade34ee44989e276ed1e35 (diff)
downloadandroid_hardware_broadcom_libbt-d58c13fb25e3ca93dcda915460600bdee6740751.tar.gz
android_hardware_broadcom_libbt-d58c13fb25e3ca93dcda915460600bdee6740751.tar.bz2
android_hardware_broadcom_libbt-d58c13fb25e3ca93dcda915460600bdee6740751.zip
Avoid an annoying bug that only hits BCM chips running at less than 3MBps
Change-Id: If31e05cd4789660780b4f34288c0d4023554afe6
Diffstat (limited to 'src/hardware.c')
-rwxr-xr-xsrc/hardware.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hardware.c b/src/hardware.c
index 651e666..8ea1c61 100755
--- a/src/hardware.c
+++ b/src/hardware.c
@@ -1045,8 +1045,15 @@ void hw_config_cback(void *p_mem)
} // if (p_buf != NULL)
/* Free the RX event buffer */
+
+// On manta this causes a crash due to an overrun elsewhere.
+// Sad as it is, if we just do not do the free here we'll just leak less than 4K each time BT is turned on.
+// And since when it is turned off, the process dies, this realy only costs us 4K total.
+// I'm willing to part with 4K to avoid debugging bluedroid
+#ifndef MANTA_BUG
if (bt_vendor_cbacks)
bt_vendor_cbacks->dealloc(p_evt_buf);
+#endif
if (is_proceeding == FALSE)
{