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

Commit e7e8e3dd authored by Steven Moreland's avatar Steven Moreland Committed by Android (Google) Code Review
Browse files

Merge "Binder: consistency of death recipient in unlink" into main

parents 6d6da0d5 e13dde8c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1608,6 +1608,8 @@ static jboolean android_os_BinderProxy_unlinkToDeath(JNIEnv* env, jobject obj,
            err = target->unlinkToDeath(origJDR, NULL, flags, &dr);
            if (err == NO_ERROR && dr != NULL) {
                sp<IBinder::DeathRecipient> sdr = dr.promote();
                LOG_ALWAYS_FATAL_IF(sdr != origJDR, "DeathRecipient mismatch, expected %p == %p",
                                    origJDR.get(), sdr.get());
                JavaDeathRecipient* jdr = static_cast<JavaDeathRecipient*>(sdr.get());
                if (jdr != NULL) {
                    jdr->clearReference();