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>
Ta zmiana jest zawarta w:
%! (template.HTML=Harish Kasiviswanathan)złożyło 2017-06-30 15:59:41 -04:00
1 rodzic 4d0697bf65
złożenie dc6ece67fd
Plik 1 zmieniony
+1
+1
Wyświetl plik
@@ -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;
}