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

Commit d5309a13 authored by android-build-team Robot's avatar android-build-team Robot Committed by android-build-merger
Browse files

Merge "Fix native_handle leak in CryptoHal" into pi-dev am: 48710967

am: 9bdd82e1

Change-Id: Icf6147fec6566a510ba2845419db90fd11822204
parents dfcc596a 9bdd82e1
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);