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/test/iface.cpp b/libs/binder/ndk/test/iface.cpp
index 80700df..0dc3cc4 100644
--- a/libs/binder/ndk/test/iface.cpp
+++ b/libs/binder/ndk/test/iface.cpp
@@ -81,7 +81,7 @@
int32_t out;
CHECK(STATUS_OK == AParcel_readInt32(parcelOut, &out));
- AParcel_delete(&parcelOut);
+ AParcel_delete(parcelOut);
return out;
}
@@ -92,7 +92,7 @@
};
IFoo::~IFoo() {
- AIBinder_Weak_delete(&mWeakBinder);
+ AIBinder_Weak_delete(mWeakBinder);
}
binder_status_t IFoo::addService(const char* instance) {
@@ -106,7 +106,7 @@
// or one strong refcount here
binder = AIBinder_new(IFoo::kClass, static_cast<void*>(new IFoo_Class_Data{this}));
if (mWeakBinder != nullptr) {
- AIBinder_Weak_delete(&mWeakBinder);
+ AIBinder_Weak_delete(mWeakBinder);
}
mWeakBinder = AIBinder_Weak_new(binder);
}