diff --git a/drivers/android/binder/allocation.rs b/drivers/android/binder/allocation.rs index 2f0763e6868d..19ee626b5b89 100644 --- a/drivers/android/binder/allocation.rs +++ b/drivers/android/binder/allocation.rs @@ -20,6 +20,7 @@ defs::*, node::{Node, NodeRef}, process::Process, + trace::trace_transaction_failed_buffer_release, DArc, }; @@ -325,6 +326,12 @@ fn deref_mut(&mut self) -> &mut Allocation { } } +impl Drop for NewAllocation { + fn drop(&mut self) { + trace_transaction_failed_buffer_release(self.debug_id); + } +} + /// A view into the beginning of an allocation. /// /// All attempts to read or write outside of the view will fail. To intentionally access outside of