From: Alain Spineux Date: Fri, 8 Oct 2021 12:23:58 +0000 (+0200) Subject: fix memory leak in ProgressCounter X-Git-Tag: Beta-15.0.0~835 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d9542e2f2fbeabaf310147c53ce6fe39ce1ee7;p=thirdparty%2Fbacula.git fix memory leak in ProgressCounter --- diff --git a/bacula/src/lib/progress.h b/bacula/src/lib/progress.h index 920906f3f..741fd1559 100644 --- a/bacula/src/lib/progress.h +++ b/bacula/src/lib/progress.h @@ -72,7 +72,12 @@ public: } reset(); }; - ~ProgressCounter() {}; + ~ProgressCounter() + { + if (accountings != NULL) { + free(accountings); + } + }; void reset(int new_state = 0, int64_t new_goal = 0, int64_t start = 0) { acc_n = 0; state = new_state; goal = new_goal; current = start;