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

Commit 1326ffef authored by Jeff Tinker's avatar Jeff Tinker
Browse files

Fix native_handle leak in CryptoHal

bug:77869193
Change-Id: Ibf9f48c469753fb57025427fa1a3feace4412993
parent 1f0cbedd
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);