https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93032
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> --- I'm not convinced that the above patch is correct. What if one or two of the fopen calls fail? Then the else branch of the "if" will be followed, and no fclose will be called on the fp for the calls that succeeded. I have a patch that enables the analyzer to report three leaks, based on the above (for each of the fopen calls succeeding where one of the others fails).