kfdtest: fix a memory leak issue in MMapLarge test
When mapMemoryToGpu fails, we need unregister it with user address as
the gpu address is not available.
Change-Id: I4418eeaa7aa37008f5bffa144e2c2171f0d238fd
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
[ROCm/ROCR-Runtime commit: 3f7b6356fd]
This commit is contained in:
@@ -168,7 +168,7 @@ TEST_F(KFDMemoryTest, MMapLarge) {
|
||||
break;
|
||||
if (hsaKmtMapMemoryToGPUNodes(addr + i, s - i,
|
||||
&AlternateVAGPU[i], mapFlags, 1, (HSAuint32 *)&defaultGPUNode)) {
|
||||
hsaKmtDeregisterMemory((void*)AlternateVAGPU[i]);
|
||||
hsaKmtDeregisterMemory(addr + i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user