From 3f94ea62716ca9360b470a1711d58631021ccaed Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Fri, 17 Dec 2021 15:04:00 -0500 Subject: [PATCH] Fix detected leaks/heap-use-after-free by AddressSanitizer at startup --- platform/x11/detect_prime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/x11/detect_prime.cpp b/platform/x11/detect_prime.cpp index 7d9a4be28fc..96eb6333c31 100644 --- a/platform/x11/detect_prime.cpp +++ b/platform/x11/detect_prime.cpp @@ -175,7 +175,7 @@ int detect_prime() { close(fdset[0]); } else { - // In child, exit() here will not quit the engine. + // In child, killing this process will not quit the engine. char string[201]; @@ -203,7 +203,7 @@ int detect_prime() { print_verbose("Couldn't write vendor/renderer string."); } close(fdset[1]); - exit(0); + raise(SIGINT); } }