Fix fd leak if application forks

If the application forks, close the fd inherited from the parent.

Change-Id: I48e4157d5f0d6f04d07ecb23b719a23934687cdb
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>


[ROCm/ROCR-Runtime commit: dc6ece67fd]
This commit is contained in:
Harish Kasiviswanathan
2017-06-30 15:55:40 -04:00
förälder 7a12251015
incheckning 45a97666b7
+1
Visa fil
@@ -68,6 +68,7 @@ static void clear_after_fork(void)
clear_events_page();
fmm_clear_all_mem();
destroy_device_debugging_memory();
close(kfd_fd);
kfd_open_count = 0;
}