]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpc_client: Fix memory leak opening local named pipe
authorSamuel Cabrero <scabrero@samba.org>
Mon, 26 Jan 2026 12:36:02 +0000 (13:36 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 27 Jan 2026 10:13:40 +0000 (10:13 +0000)
If no local server name was passed to rpc_pipe_open_local_np() then
get_myname() was called with NULL talloc context instead of the
current stackframe.

This was causing an increase of memory usage on busy servers with long-living
rpcd_* workers.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15979

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jan 27 10:13:40 UTC 2026 on atb-devel-224

source3/rpc_client/cli_pipe.c

index 660cda5ea91a00047748de1eb2d9e106d2cc45a0..002ead6d5f914cd9a03bcdcf53010debc65339e1 100644 (file)
@@ -3624,7 +3624,7 @@ NTSTATUS rpc_pipe_open_local_np(
        }
 
        if (local_server_name == NULL) {
-               local_server_name = get_myname(result);
+               local_server_name = get_myname(frame);
        }
 
        if (local_server_addr != NULL) {