Fix double free issue and pointer alignment

Change-Id: Id5bab454d53d404883a92282168b3f6cbc468cbb
Signed-off-by: Ben Goz <ben.goz@amd.com>
This commit is contained in:
Ben Goz
2016-02-11 17:53:00 +02:00
committed by Gerrit Code Review
parent cd6d75880f
commit b37f99a01e
2 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -271,10 +271,8 @@ hsaKmtMapMemoryToGPUNodes(
ret = validate_nodeid_array(&gpu_id_array,
NumberOfNodes, NodeArray);
if (ret != HSAKMT_STATUS_SUCCESS) {
free(gpu_id_array);
if (ret != HSAKMT_STATUS_SUCCESS)
return ret;
}
ret = fmm_register_memory(MemoryAddress, MemorySizeInBytes,
gpu_id_array, NumberOfNodes);