...
This noncompliant code example, and the subsequent compliant solutions, are assumed to eventually call std::terminate()
in accordance with the ERR50-CPP-EX1 exception described in ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit()abruptly terminate the program. Indicating the nature of the problem to the operator is elided for brevity.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
This rule supplements FIO42-C. Close files when they are no longer needed.
SEI CERT C++ Coding Standard | MEM51-CPP. Properly deallocate dynamically allocated resources | SEI CERT C Coding Standard | FIO42-C. Close files when they are no longer needed
Bibliography
[ISO/IEC 14882-2014] | Subclause 27.9.1, "File Streams" |
...