From 24f36de0371806b8fe500e117dd7fd25682e4e87 Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Tue, 17 Jun 2025 15:50:53 -0500 Subject: [PATCH] rocr: Add missing close of dmabuf after import --- runtime/hsa-runtime/core/runtime/runtime.cpp | 1 + 1 file changed, 1 insertion(+) 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; }