git: 005727cf8807 - main - sysutils/bacula15-server: Apply upstream bpipe patch

From: Dan Langille <dvl_at_FreeBSD.org>
Date: Thu, 23 Jan 2025 12:37:42 UTC
The branch main has been updated by dvl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=005727cf8807bc3756bd33a9104179f264db5469

commit 005727cf8807bc3756bd33a9104179f264db5469
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2025-01-23 12:35:32 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2025-01-23 12:37:01 +0000

    sysutils/bacula15-server: Apply upstream bpipe patch
    
    * https://sourceforge.net/p/bacula/mailman/message/59121596/
    * https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/commit/453dc8ef9e41ba21b7fc4b69ab49e5f31f40b067
    
    PR:             284250
---
 sysutils/bacula15-server/Makefile                           |  2 +-
 .../bacula15-server/files/patch-src_plugins_fd_bpipe-fd.c   | 13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/sysutils/bacula15-server/Makefile b/sysutils/bacula15-server/Makefile
index 907b6148fdb3..5ab79d4d4852 100644
--- a/sysutils/bacula15-server/Makefile
+++ b/sysutils/bacula15-server/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	bacula
 DISTVERSION=	15.0.2
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES?=	sysutils
 MASTER_SITES=	SF/bacula/bacula/${DISTVERSION}
 PKGNAMEPREFIX?=	#
diff --git a/sysutils/bacula15-server/files/patch-src_plugins_fd_bpipe-fd.c b/sysutils/bacula15-server/files/patch-src_plugins_fd_bpipe-fd.c
new file mode 100644
index 000000000000..028d66a4bd04
--- /dev/null
+++ b/sysutils/bacula15-server/files/patch-src_plugins_fd_bpipe-fd.c
@@ -0,0 +1,13 @@
+--- src/plugins/fd/bpipe-fd.c.orig	2024-03-22 09:48:41 UTC
++++ src/plugins/fd/bpipe-fd.c
+@@ -202,7 +202,9 @@ static bRC freePlugin(bpContext *ctx)
+    if (!p_ctx) {
+       return bRC_Error;
+    }
+-   bfree_and_null(p_ctx->cmd);
++   if (p_ctx->cmd) {
++      free(p_ctx->cmd);                  /* free any allocated command string */
++   }
+    free_and_null_pool_memory(p_ctx->restore_obj_buf);
+    if (p_ctx->rop_writer) {
+       restoreobj *rop;