mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Fixed close fd after calling drm ioctl prime fd to handle
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0f42ef1ed7
commit
4ca1784712
@@ -572,8 +572,6 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
closeFunction(openFd.fd);
|
||||
|
||||
auto boHandle = openFd.handle;
|
||||
auto bo = findAndReferenceSharedBufferObject(boHandle);
|
||||
|
||||
@@ -588,6 +586,8 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o
|
||||
pushSharedBufferObject(bo);
|
||||
}
|
||||
|
||||
closeFunction(handle);
|
||||
|
||||
lock.unlock();
|
||||
|
||||
auto drmAllocation = new DrmAllocation(properties.rootDeviceIndex, properties.allocationType, bo, reinterpret_cast<void *>(bo->gpuAddress), bo->size,
|
||||
|
||||
Reference in New Issue
Block a user