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.

a8f9c8069e/libc/stdio/stdio.cpp (374)
This commit is contained in:
Yen Chi Hsuan 2017-04-13 23:19:23 +08:00
parent 3d0159dc1f
commit b87a2ca53d

View File

@ -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;
}