From f7d9542e2f2fbeabaf310147c53ce6fe39ce1ee7 Mon Sep 17 00:00:00 2001 From: Alain Spineux Date: Fri, 8 Oct 2021 14:23:58 +0200 Subject: [PATCH] fix memory leak in ProgressCounter --- bacula/src/lib/progress.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.47.3