Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c405a5ae authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: BBinder::attachObject abort on OOM" am: aaadb20e am:...

Merge "libbinder: BBinder::attachObject abort on OOM" am: aaadb20e am: 92390fc1 am: 29ecadbe am: f5b31e57

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1749082

Change-Id: I49954049b0be15f8530225d380905348ce13e363
parents 47601f3a f5b31e57
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -325,7 +325,7 @@ status_t BBinder::dump(int /*fd*/, const Vector<String16>& /*args*/)
void* BBinder::attachObject(const void* objectID, void* object, void* cleanupCookie,
void* BBinder::attachObject(const void* objectID, void* object, void* cleanupCookie,
                            object_cleanup_func func) {
                            object_cleanup_func func) {
    Extras* e = getOrCreateExtras();
    Extras* e = getOrCreateExtras();
    if (!e) return nullptr; // out of memory
    LOG_ALWAYS_FATAL_IF(!e, "no memory");


    AutoMutex _l(e->mLock);
    AutoMutex _l(e->mLock);
    return e->mObjects.attach(objectID, object, cleanupCookie, func);
    return e->mObjects.attach(objectID, object, cleanupCookie, func);