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]
Tá an tiomantas seo le fáil i:
1 tuismitheoir
17e104702a
tiomantas
76f3da6bd0
1 comhad athraithe
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir