diff options
author | Samuel Cabrero <scabrero@samba.org> | 2022-04-13 11:15:35 +0200 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-04-15 13:04:13 +0000 |
commit | 29ec750566d2e7208afff6a97f319553c6431efd (patch) | |
tree | 128d41e4a24348b385b71199c981693aa7582a62 | |
parent | 46f331e219611798cb0e9379d2ec05a84ff15f8a (diff) | |
download | samba-29ec750566d2e7208afff6a97f319553c6431efd.tar.gz |
s3:winbind: Simplify open_cached_internal_pipe_conn()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15046
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 91395e660a2b1b69bf74ca0b77aee416e2ac1db3)
-rw-r--r-- | source3/winbindd/winbindd_samr.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c index ce66adcc0c7..20b5d758d1a 100644 --- a/source3/winbindd/winbindd_samr.c +++ b/source3/winbindd/winbindd_samr.c @@ -128,9 +128,10 @@ static NTSTATUS open_cached_internal_pipe_conn( struct rpc_pipe_client **lsa_pipe, struct policy_handle *lsa_hnd) { - struct winbind_internal_pipes *internal_pipes = NULL; + struct winbind_internal_pipes *internal_pipes = + domain->backend_data.samr_pipes; - if (domain->backend_data.samr_pipes == NULL) { + if (internal_pipes == NULL) { TALLOC_CTX *frame = talloc_stackframe(); NTSTATUS status; @@ -157,14 +158,11 @@ static NTSTATUS open_cached_internal_pipe_conn( } domain->backend_data.samr_pipes = - talloc_move(domain, &internal_pipes); + talloc_steal(domain, internal_pipes); TALLOC_FREE(frame); - } - internal_pipes = domain->backend_data.samr_pipes; - if (samr_domain_hnd) { *samr_domain_hnd = internal_pipes->samr_domain_hnd; } |