From b9d683275284471d594a8f2f89e8738fa07ab9f3 Mon Sep 17 00:00:00 2001 From: Victor Hsieh Date: Fri, 8 Feb 2019 09:56:16 -0800 Subject: [PATCH] Fix crash by wrong assertion check The original destructor didn't actually run. But since ag/6239075 fixed the memory leak, this starts to crash. Test: atest ApkVerityTest (not yet submitted) Bug: 112037636 Change-Id: Ie7fe3eaf9e1ff1b374243b1d78417423ffba0049 --- services/core/jni/com_android_server_security_VerityUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/jni/com_android_server_security_VerityUtils.cpp b/services/core/jni/com_android_server_security_VerityUtils.cpp index bf96f9a3b71bd..6cd9f2c718ee8 100644 --- a/services/core/jni/com_android_server_security_VerityUtils.cpp +++ b/services/core/jni/com_android_server_security_VerityUtils.cpp @@ -122,7 +122,7 @@ class JavaByteArrayHolder { } ~JavaByteArrayHolder() { - LOG_ALWAYS_FATAL_IF(mElements == nullptr, "Elements are not released"); + LOG_ALWAYS_FATAL_IF(mElements != nullptr, "Elements are not released"); } private: