diff options
author | Tim Potter <tpot@samba.org> | 2001-10-29 04:50:17 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-10-29 04:50:17 +0000 |
commit | b8b04c4d5ee8c3a7f1f55fdd809dcda638a16efe (patch) | |
tree | 45343755266b5642699b6b675637b474481887e7 /source3/nsswitch/winbindd_util.c | |
parent | 67dae09cc6b124662aa514df06dd89492382e15f (diff) | |
download | samba-b8b04c4d5ee8c3a7f1f55fdd809dcda638a16efe.tar.gz samba-b8b04c4d5ee8c3a7f1f55fdd809dcda638a16efe.tar.bz2 samba-b8b04c4d5ee8c3a7f1f55fdd809dcda638a16efe.zip |
Don't reference tallocated memory that has already been disposed of. The
cli_samr_query_userinfo function used to do this.
(This used to be commit da2c167660ec12360354f96dc672d935f58dd9c0)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index cf0e6b8e93..614198673b 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -287,17 +287,14 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, fstring name, /* Lookup user information from a rid */ -BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain, uint32 user_rid, +BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, uint32 user_rid, SAM_USERINFO_CTR **user_info) { - TALLOC_CTX *mem_ctx; CLI_POLICY_HND *hnd; uint16 info_level = 0x15; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - if (!(mem_ctx = talloc_init())) - return False; - if (!(hnd = cm_get_sam_user_handle(domain->name, &domain->sid, user_rid))) goto done; @@ -306,8 +303,6 @@ BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain, uint32 user_rid, info_level, user_info); done: - talloc_destroy(mem_ctx); - return NT_STATUS_IS_OK(result); } |