fixing tiny resource leak when reading /proc/cpuinfo on Linux
This commit is contained in:
parent
02d2875def
commit
c5d2415e6e
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue