Guided by CodeQL static code analyser. FileMayNotBeClosed.ql FileMayNeverBeClosed.ql The trick with "if(fp != stdout)" is problematic (to analyser) as technically 'stdout' can be a global pointer that COULD be modified any time, so it might have changed between the fopen() and fclose() calls so the close MAY NEVER occurs (which is problem the analyzer can see). So local state is maintained as a bool which will also clarify to the compiler see the intention without concern for external stdout modification. Some items appear to be out and out leaks when certain commands are use. |
||
|---|---|---|
| .. | ||
| Makefile | ||
| plot.h | ||
| plotCmd.c | ||
| plotGremln.c | ||
| plotHP.c | ||
| plotInt.h | ||
| plotMain.c | ||
| plotPNM.c | ||
| plotPS.c | ||
| plotPixels.c | ||
| plotRutils.c | ||
| plotVers.c | ||
| tclplot.c | ||