From 25fe484101a589d6d15df21456060888aaaa149a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 13 Dec 2006 16:39:50 +0000 Subject: r20150: better memory handling for some functions, make sure we don't leak memory by using the wrong(long lived) mem context (This used to be commit a28cdd6e742cb72a728bd337546ee95fd4160ed8) --- source3/nsswitch/winbindd_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/nsswitch/winbindd_util.c') diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index e4b51019aa..6f15908687 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -718,6 +718,9 @@ BOOL winbindd_lookup_name_by_sid(TALLOC_CTX *mem_ctx, NTSTATUS result; struct winbindd_domain *domain; + *dom_name = NULL; + *name = NULL; + domain = find_lookup_domain_from_sid(sid); if (!domain) { @@ -736,7 +739,6 @@ BOOL winbindd_lookup_name_by_sid(TALLOC_CTX *mem_ctx, } *type = SID_NAME_UNKNOWN; - *name = talloc_strdup(mem_ctx, name_deadbeef); return False; } -- cgit