SWDEV-549707 - Fixed memleak in hipMemImportFromShareableHandle (#442)

Co-authored-by: Ioannis Assiouras <Ioannis.Assiouras@amd.com>
Этот коммит содержится в:
systems-assistant[bot]
2025-08-20 19:28:59 +01:00
коммит произвёл GitHub
родитель 621da5410a
Коммит 4d5db26646
+2 -2
Просмотреть файл
@@ -260,8 +260,8 @@ hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t* hand
phys_mem_obj->getUserData().data = new hip::GenericAllocation(*phys_mem_obj, 0, prop);
*handle = reinterpret_cast<hipMemGenericAllocationHandle_t>(phys_mem_obj->getUserData().data);
if (amd::MemObjMap::FindMemObj(phys_mem_obj->getSvmPtr())) {
amd::MemObjMap::RemoveMemObj(phys_mem_obj->getSvmPtr());
if (!amd::MemObjMap::FindMemObj(phys_mem_obj->getSvmPtr())) {
amd::MemObjMap::AddMemObj(phys_mem_obj->getSvmPtr(), phys_mem_obj);
}
HIP_RETURN(hipSuccess);