libbinder: Flush excess refs after single async transaction
After processing a single async transaction, RpcState previously
returned without flushing the excess Binder references. This
fixes the control flow so that the refs get flushed for any
number of transactions.
Bug: 259517277
Test: trusty_stats_test
Change-Id: I2665f3b0d6120d4d79f46ef5141c9ff5f85fd5b5
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index b27f102..1ea13f9 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -1036,8 +1036,8 @@
return DEAD_OBJECT;
}
- if (it->second.asyncTodo.size() == 0) return OK;
- if (it->second.asyncTodo.top().asyncNumber == it->second.asyncNumber) {
+ if (it->second.asyncTodo.size() != 0 &&
+ it->second.asyncTodo.top().asyncNumber == it->second.asyncNumber) {
LOG_RPC_DETAIL("Found next async transaction %" PRIu64 " on %" PRIu64,
it->second.asyncNumber, addr);