]> git.samba.org - martins/samba.git/commitdiff
smbd: Do an early TALLOC_FREE in smbXsrv_client_global_init()
authorVolker Lendecke <vl@samba.org>
Fri, 9 Feb 2024 17:16:09 +0000 (18:16 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 30 Apr 2024 22:44:32 +0000 (22:44 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smbXsrv_client.c

index d86ae704493beef9b2f156b361a2c9a94a344a75..c05ca235a5104b871f9865b7f57d8d37a323f53d 100644 (file)
@@ -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;