X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b28df10f14f16593d75ae05fe82a99ace636b16e..67362c8e2e2d6d9f666176d3479b45259522d27b:/projects/stargazer/traffcounter.cpp diff --git a/projects/stargazer/traffcounter.cpp b/projects/stargazer/traffcounter.cpp index 72c1295b..1d088f48 100644 --- a/projects/stargazer/traffcounter.cpp +++ b/projects/stargazer/traffcounter.cpp @@ -30,6 +30,7 @@ #include #include +#include // Functions fopen and similar #include "traffcounter.h" #include "common.h" @@ -698,6 +699,7 @@ while (fgets(str, 1023, f)) if (r != 3) { WriteServLog("Error in file %s. There must be 3 parameters. Line %d.", rulesFileName.c_str(), lineNumber); + fclose(f); return true; } @@ -720,6 +722,7 @@ while (fgets(str, 1023, f)) { WriteServLog("Error in file %s. Line %d.", rulesFileName.c_str(), lineNumber); + fclose(f); return true; } @@ -727,6 +730,7 @@ while (fgets(str, 1023, f)) { WriteServLog("Error in file %s. Error in adress. Line %d.", rulesFileName.c_str(), lineNumber); + fclose(f); return true; } if (!test)