From 2314c606297218b8e16bb42b181c1ea175cf710a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 05:01:31 +0930 Subject: [PATCH] source3/winbindd/winbindd_util.c: fix stackframe leak winbindd_can_contact_domain() doesn't always free its stackframe. Signed-off-by: Rusty Russell --- source3/winbindd/winbindd_util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index ffc9115ad36..162cdf22e1a 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -1173,7 +1173,8 @@ bool winbindd_can_contact_domain(struct winbindd_domain *domain) /* We can contact the domain if it is our primary domain */ if (domain->primary) { - return true; + ret = true; + goto done; } /* Trust the TDC cache and not the winbindd_domain flags */ @@ -1181,7 +1182,8 @@ bool winbindd_can_contact_domain(struct winbindd_domain *domain) if ((tdc = wcache_tdc_fetch_domain(frame, domain->name)) == NULL) { DEBUG(10,("winbindd_can_contact_domain: %s not found in cache\n", domain->name)); - return false; + ret = false; + goto done; } /* Can always contact a domain that is in out forest */ -- 2.34.1