From: Volker Lendecke Date: Fri, 9 Feb 2024 17:16:09 +0000 (+0100) Subject: smbd: Do an early TALLOC_FREE in smbXsrv_client_global_init() X-Git-Tag: tdb-1.4.11~893 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b4ab077c8d5372ba187efd3a6a540e15cf6c63a;p=thirdparty%2Fsamba.git smbd: Do an early TALLOC_FREE in smbXsrv_client_global_init() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smbXsrv_client.c b/source3/smbd/smbXsrv_client.c index d86ae704493..c05ca235a51 100644 --- a/source3/smbd/smbXsrv_client.c +++ b/source3/smbd/smbXsrv_client.c @@ -55,7 +55,7 @@ static struct db_context *smbXsrv_client_global_db_ctx = NULL; NTSTATUS smbXsrv_client_global_init(void) { - const char *global_path = NULL; + char *global_path = NULL; struct db_context *backend = NULL; struct db_context *db_ctx = NULL; @@ -79,6 +79,7 @@ NTSTATUS smbXsrv_client_global_init(void) O_RDWR | O_CREAT, 0600, DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); + TALLOC_FREE(global_path); if (backend == NULL) { NTSTATUS status;