diff --git a/runtime/hsa-runtime/core/runtime/runtime.cpp b/runtime/hsa-runtime/core/runtime/runtime.cpp index baebbe6017..0bfbe58fb3 100644 --- a/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -3396,6 +3396,7 @@ Runtime::MappedHandleAllowedAgent::MappedHandleAllowedAgent( status = targetAgent->driver().ImportDMABuf(dmabuf_fd, *targetAgent, shareable_handle); assert(status == HSA_STATUS_SUCCESS); + close(dmabuf_fd); if (status != HSA_STATUS_SUCCESS) return; }