fixing tiny resource leak when reading /proc/cpuinfo on Linux

This commit is contained in:
tpltnt 2023-10-10 18:00:10 +02:00
parent 02d2875def
commit c5d2415e6e

View file

@ -96,6 +96,9 @@ static std::string get_cpu_info() {
} }
} }
} }
if (0 != fclose(f)) {
fprintf(stderr, "could not close reader of /proc/cpuinfo\n");
}
} }
#endif #endif
// TODO: other platforms // TODO: other platforms