libbinder_ndk: _delete APIs take * not **.
Since having ** requires having a pointer allocated on the stack. This
is pretty common if you are using an object within a scope, but causes
problems when it is not.
Bug: 111445392
Test: ./ndk/runtests.sh
Change-Id: If7586548af0b47d8e09178fc3b71af50d449e290
diff --git a/libs/binder/ndk/status.cpp b/libs/binder/ndk/status.cpp
index deb0392..549e4b3 100644
--- a/libs/binder/ndk/status.cpp
+++ b/libs/binder/ndk/status.cpp
@@ -66,13 +66,8 @@
return status->get()->exceptionMessage().c_str();
}
-void AStatus_delete(AStatus** status) {
- if (status == nullptr) {
- return;
- }
-
- delete *status;
- *status = nullptr;
+void AStatus_delete(AStatus* status) {
+ delete status;
}
binder_status_t PruneStatusT(status_t status) {