From b8b04c4d5ee8c3a7f1f55fdd809dcda638a16efe Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Oct 2001 04:50:17 +0000 Subject: 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) --- source3/nsswitch/winbindd_util.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source3/nsswitch/winbindd_util.c') 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); } -- cgit