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>
이 커밋은 다음에 포함됨:
xinhui pan 작성하고 Xinhui Pan가 2018-08-10 05:26:06 -04:00를 커밋함
1 부모 eb5539fb10
커밋 3f7b6356fd
1 파일이 변경됨
+1 -1
+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;
}
}