diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-05 10:43:43 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-05 10:43:43 +0000 |
commit | a87b9bf561e24ff4b42f79a9a95a82f8ec8c9f4a (patch) | |
tree | 8412e1ecf794f11e011af8314b5cb5037fe52a24 | |
parent | 6194d6a54161931008244766a380e909bb5a8e63 (diff) | |
download | samba-a87b9bf561e24ff4b42f79a9a95a82f8ec8c9f4a.tar.gz samba-a87b9bf561e24ff4b42f79a9a95a82f8ec8c9f4a.tar.bz2 samba-a87b9bf561e24ff4b42f79a9a95a82f8ec8c9f4a.zip |
fixed a memory leak
(This used to be commit 45c328800e42ba01c8d6113c0691546804137677)
-rw-r--r-- | source3/nsswitch/winbindd_ads.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index edf4d45c38..e528ad68c2 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -33,12 +33,15 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) { ADS_STRUCT *ads; int rc; + char *password; if (domain->private) { return (ADS_STRUCT *)domain->private; } - ads = ads_init(NULL, NULL, NULL, secrets_fetch_machine_password()); + password = secrets_fetch_machine_password(); + ads = ads_init(NULL, NULL, NULL, password); + free(password); if (!ads) { DEBUG(1,("ads_init for domain %s failed\n", domain->name)); return NULL; |