mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: avoid memory leak
Related-To: NEO-9038 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
08e92d154f
commit
83c306e927
@@ -11,14 +11,14 @@
|
||||
|
||||
#include "os_pin.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
PinContext::OsLibraryLoadPtr PinContext::osLibraryLoadFunction(NEO::OsLibrary::load);
|
||||
|
||||
bool PinContext::init(const std::string >PinOpenFunctionName) {
|
||||
NEO::OsLibrary *hGtPinLibrary = nullptr;
|
||||
|
||||
hGtPinLibrary = PinContext::osLibraryLoadFunction(PinContext::gtPinLibraryFilename.c_str());
|
||||
auto hGtPinLibrary = std::unique_ptr<OsLibrary>(PinContext::osLibraryLoadFunction(PinContext::gtPinLibraryFilename.c_str()));
|
||||
|
||||
if (hGtPinLibrary == nullptr) {
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "Unable to find gtpin library %s\n", PinContext::gtPinLibraryFilename.c_str());
|
||||
|
||||
Reference in New Issue
Block a user