]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix memory leak with RestoreObject compression
authorEric Bollengier <eric@baculasystems.com>
Mon, 21 Nov 2022 13:58:59 +0000 (14:58 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:00 +0000 (13:57 +0200)
bacula/src/filed/backup.c

index a1a4b656b3dd5ea7428b81be8180df47ec57beed..dac29f88c3f17153d8c9ecc7f4fa0e4eddad50b6 100644 (file)
@@ -1207,6 +1207,7 @@ bool encode_and_send_attributes(bctx_t &bctx)
          } else {
             /* Uncompressed object smaller, use it */
             comp_len = ff_pkt->restore_obj.object_len;
+            free_pool_memory(comp_obj);
          }
          Dmsg2(100, "Object compressed from %d to %d bytes\n", ff_pkt->restore_obj.object_len, comp_len);
       }