]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
fix memory leak in ProgressCounter
authorAlain Spineux <alain@baculasystems.com>
Fri, 8 Oct 2021 12:23:58 +0000 (14:23 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:56 +0000 (13:56 +0200)
bacula/src/lib/progress.h

index 920906f3fdaf93d7faccebd5ca2df1efba3a657f..741fd1559d52fdb7fd4c89948fa3b98099f99eca 100644 (file)
@@ -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;