diff options
author | Günther Deschner <gd@samba.org> | 2006-06-13 13:41:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:23 -0500 |
commit | 1628d33ba0bb8b6cf7f5253c99b6aebcb304695f (patch) | |
tree | e5afe6496a7b2014a4b74251bdaddc9fbc18a6bd /source3/libads | |
parent | 2828356be330be60cb1cea13ea6460d6f3255696 (diff) | |
download | samba-1628d33ba0bb8b6cf7f5253c99b6aebcb304695f.tar.gz samba-1628d33ba0bb8b6cf7f5253c99b6aebcb304695f.tar.bz2 samba-1628d33ba0bb8b6cf7f5253c99b6aebcb304695f.zip |
r16190: Fix more memleaks.
Guenther
(This used to be commit dfebcc8e19bee06b7c03f88845314e9cfd6f398a)
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 7b8b41b10a..7fb5dac51b 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1213,9 +1213,10 @@ char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid) status = ads_search_dn(ads, &res, base, attrs); if (!ADS_ERR_OK(status)) { DEBUG(1,("Failed while searching for: %s\n", base)); + SAFE_FREE(base); return NULL; } - free(base); + SAFE_FREE(base); if (ads_count_replies(ads, res) != 1) { return NULL; @@ -1242,6 +1243,10 @@ char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid) free(s); } + ads_memfree(ads, wkn_dn); + ldap_value_free(wkn_dn_exp); + ldap_value_free(bind_dn_exp); + return ret; } |