From eba4b7b5c91a2351e09b19331bda74e8814d34b4 Mon Sep 17 00:00:00 2001 From: Esfomeado Date: Sun, 9 Apr 2017 18:47:00 +0100 Subject: [PATCH] Fix leake and use pre-increment --- executor.cpp | 2 +- jconf.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/executor.cpp b/executor.cpp index af10811..8f5a2a9 100644 --- a/executor.cpp +++ b/executor.cpp @@ -83,7 +83,7 @@ void executor::ex_clock_thd() ev = lTimedEvents.erase(ev); } else - ev++; + ++ev; } lck.unlock(); diff --git a/jconf.cpp b/jconf.cpp index 612065e..d0dd815 100644 --- a/jconf.cpp +++ b/jconf.cpp @@ -301,6 +301,7 @@ bool jconf::parse_config(const char* sFilename) if(flen <= 16) { + fclose(pFile); printer::inst()->print_msg(L0, "File is empty or too short - %s.", sFilename); return false; }