Fix native_handle leak in CryptoHal
bug:77869193
Change-Id: Ibf9f48c469753fb57025427fa1a3feace4412993
diff --git a/drm/libmediadrm/CryptoHal.cpp b/drm/libmediadrm/CryptoHal.cpp
index 61b5127..f229751 100644
--- a/drm/libmediadrm/CryptoHal.cpp
+++ b/drm/libmediadrm/CryptoHal.cpp
@@ -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 @@
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);