diff --git a/lib/libc/locale/rune.c b/lib/libc/locale/rune.c index 4e15480566f7..8075825bd7fa 100644 --- a/lib/libc/locale/rune.c +++ b/lib/libc/locale/rune.c @@ -86,6 +86,7 @@ setrunelocale(encoding) fclose(fp); return(EFTYPE); } + fclose(fp); if (!rl->encoding[0] || !strcmp(rl->encoding, "UTF2")) { return(_UTF2_init(rl)); diff --git a/lib/libc/locale/startup_setlocale.c b/lib/libc/locale/startup_setlocale.c index 3f6da49c4775..01a677074018 100644 --- a/lib/libc/locale/startup_setlocale.c +++ b/lib/libc/locale/startup_setlocale.c @@ -186,6 +186,7 @@ startup_setrunelocale(encoding) fclose(fp); return(EFTYPE); } + fclose(fp); if (!rl->encoding[0]) return(EINVAL);