]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix memory problem in bpipe plugin
authorEric Bollengier <eric@baculasystems.com>
Wed, 26 May 2021 08:30:21 +0000 (10:30 +0200)
committerEric Bollengier <eric@baculasystems.com>
Fri, 30 Jun 2023 16:16:19 +0000 (18:16 +0200)
bacula/src/plugins/fd/bpipe-fd.c

index 34b3c7fd3285394ba6eb4f0c90f1fba0b7f8c9c3..ae598d91dbf73c4a2a0b16e1cbc244620581423f 100644 (file)
@@ -202,9 +202,7 @@ static bRC freePlugin(bpContext *ctx)
    if (!p_ctx) {
       return bRC_Error;
    }
-   if (p_ctx->cmd) {
-      free(p_ctx->cmd);                  /* free any allocated command string */
-   }
+   bfree_and_null(p_ctx->cmd);
    free_and_null_pool_memory(p_ctx->restore_obj_buf);
    if (p_ctx->rop_writer) {
       restoreobj *rop;