summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk4
-rwxr-xr-xsrc/hardware.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 405a292..6cab564 100644
--- a/Android.mk
+++ b/Android.mk
@@ -31,6 +31,10 @@ ifeq ($(BOARD_HAVE_SAMSUNG_BLUETOOTH),true)
LOCAL_CFLAGS += -DSAMSUNG_BLUETOOTH
endif
+ifeq ($(BCM_BLUETOOTH_MANTA_BUG), true)
+ LOCAL_CFLAGS += -DMANTA_BUG
+endif
+
include $(LOCAL_PATH)/vnd_buildcfg.mk
include $(BUILD_SHARED_LIBRARY)
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)
{