From e8008fb36d7821eafffc5f0ff2ee6f080f84c4ae Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 10 Jan 2017 13:28:41 +0000 Subject: [PATCH] winbind: Fix CID 1398530 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/winbindd/winbindd_ads.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index 83579686ff4..b14f21e3644 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -356,8 +356,9 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, } if (!ads_pull_sid(ads, msg, "objectSid", &user_sid)) { - DBG_INFO("No sid for %s !?\n", - ads_get_dn(ads, talloc_tos(), msg)); + char *dn = ads_get_dn(ads, talloc_tos(), msg); + DBG_INFO("No sid for %s !?\n", dn); + TALLOC_FREE(dn); continue; } -- 2.47.2