From 0ec65b8c6438b6d12f17487fdc4c870fe37c7caa Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 11 Jul 2019 13:12:46 +0000 Subject: Revert "COMPMID-2425: Fix memory leak reported by coverity" This reverts commit 74cd112addebc7678cb763cc1cb173feb0e61bb2. Reason for revert: Makes platforms to hang in some cases Change-Id: I8f25f6976fec9fbce0869b7b27502e4895306b5f Reviewed-on: https://review.mlplatform.org/c/1521 Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/CL/OpenCL.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp index 0212774161..ef03a5a302 100644 --- a/src/core/CL/OpenCL.cpp +++ b/src/core/CL/OpenCL.cpp @@ -35,14 +35,6 @@ CLSymbols &CLSymbols::get() return symbols; } -CLSymbols::~CLSymbols() -{ - if(handle) - { - dlclose(handle); - } -} - bool CLSymbols::load_default() { static const std::vector libraries{ "libOpenCL.so", "libGLES_mali.so", "libmali.so" }; @@ -69,7 +61,7 @@ bool CLSymbols::load_default() bool CLSymbols::load(const std::string &library) { - handle = dlopen(library.c_str(), RTLD_LAZY | RTLD_LOCAL); + void *handle = dlopen(library.c_str(), RTLD_LAZY | RTLD_LOCAL); if(handle == nullptr) { -- cgit v1.2.1