summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorSantosh Kumar Pradhan <spradhan@redhat.com>2014-02-20 15:51:37 +0530
committerJeremy Allison <jra@samba.org>2014-02-20 11:41:51 -0800
commit30cd122beb32d0935afcd5bc2f3192f3c25aaeea (patch)
treee8d2a8158d2257fa826f93f3be5d6470caa76624 /source3/winbindd
parentbd55fdbf09bd91351e097d4b71925c84de7b2a6e (diff)
downloadsamba-30cd122beb32d0935afcd5bc2f3192f3c25aaeea.tar.gz
winbindd: Avoid using deallocated memory
Failure in ads_search_retry() deallocates the memory occupied by "ads" which should not be used after. CID: 242096 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_ads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index 18749c97c46..4f149a757be 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -297,9 +297,9 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
if (!ADS_ERR_OK(rc)) {
DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc)));
status = ads_ntstatus(rc);
+ goto done;
} else if (!res) {
DEBUG(1,("query_user_list ads_search returned NULL res\n"));
-
goto done;
}