Fix a memory leak in the osi allocation tracker

Add a missing free(allocation) inside allocation_tracker_notify_free()
when freeing a memory buffer.

Prior to switching the allocation tracker to use C++ unordered_map,
the "allocation" bin was kept within (and reused) by the older hash_map
mechanism. However, after the switch to the C++ unordered_map this
is no longer the case, hence the memory leak.

Test: watch -n 1 "adb shell dumpsys meminfo -d BT-PID | grep Heap"
Bug: 34785845
Change-Id: I737c901a6452d29d18fd8b847e7d5ea10c5ff485
(cherry picked from commit 1aa40037fde7e57ae99468b9dd40e7788ed3978b)
diff --git a/osi/src/ b/osi/src/
index 461e342..2dee1dc 100644
--- a/osi/src/
+++ b/osi/src/
@@ -165,6 +165,7 @@
   // Double-free of memory is detected with "assert(allocation)" above
   // as the allocation entry will not be present.
+  free(allocation);
   return ((char*)ptr) - canary_size;