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

Commit 48710967 authored by android-build-team Robot's avatar android-build-team Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix native_handle leak in CryptoHal" into pi-dev

parents 036e93aa 1326ffef
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <android/hidl/manager/1.0/IServiceManager.h>

#include <binder/IMemory.h>
#include <cutils/native_handle.h>
#include <hidlmemory/FrameworkUtils.h>
#include <media/hardware/CryptoAPI.h>
#include <media/stagefright/foundation/ADebug.h>
@@ -245,11 +244,6 @@ int32_t CryptoHal::setHeapBase(const sp<IMemoryHeap>& heap) {
        ALOGE("setHeapBase(): heap is NULL");
        return -1;
    }
    native_handle_t* nativeHandle = native_handle_create(1, 0);
    if (!nativeHandle) {
        ALOGE("setHeapBase(), failed to create native handle");
        return -1;
    }

    Mutex::Autolock autoLock(mLock);