From b87a2ca53d8865b692ff93d07f35c170cf22871f Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Thu, 13 Apr 2017 23:19:23 +0800 Subject: [PATCH] There's no need to close an invalid FILE* Android doesn't have /proc/modules, and darling segfaults instead of reporting errors elegantly. On BioniC, fclose(NULL) leads to SIGSEGV. https://android.googlesource.com/platform/bionic/+/a8f9c8069ec45117393bc3abca3379cf62b1124e/libc/stdio/stdio.cpp#374 --- src/startup/darling.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/startup/darling.c b/src/startup/darling.c index 1f4b746ed..231f93f7a 100644 --- a/src/startup/darling.c +++ b/src/startup/darling.c @@ -893,7 +893,6 @@ int isModuleLoaded() if ((fp = fopen("/proc/modules", "r")) == NULL) { fprintf(stderr, "Failure opening /proc/modules: %s\n", strerror(errno)); - fclose(fp); return 0; } -- 2.51.2