diff options
author | Günther Deschner <gd@samba.org> | 2006-11-01 11:19:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:41 -0500 |
commit | 31a63ab19f2a1f717db90d1164a8b696c625e739 (patch) | |
tree | d6a7639047c0bbe6180a1c2e6412a44e9a2f42a2 /source3/libads | |
parent | 4e0f560f609f1d79f1821f20a16f8c50eaae7b3e (diff) | |
download | samba-31a63ab19f2a1f717db90d1164a8b696c625e739.tar.gz samba-31a63ab19f2a1f717db90d1164a8b696c625e739.tar.bz2 samba-31a63ab19f2a1f717db90d1164a8b696c625e739.zip |
r19528: Fix container handling for "net ads user" and "net ads group" functions
along with some memleaks.
Guenther
(This used to be commit 4bad52c5b3a983418d4216a2c3f5e04926e37e94)
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 6fbae51179..1e726f5e55 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1299,6 +1299,7 @@ char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid) SAFE_FREE(base); if (ads_count_replies(ads, res) != 1) { + ads_msgfree(ads, res); return NULL; } @@ -1314,7 +1315,7 @@ char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid) new_ln = wkn_ln - bind_ln; - ret = wkn_dn_exp[0]; + ret = SMB_STRDUP(wkn_dn_exp[0]); for (i=1; i < new_ln; i++) { char *s; @@ -1323,6 +1324,7 @@ char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid) free(s); } + ads_msgfree(ads, res); ads_memfree(ads, wkn_dn); ldap_value_free(wkn_dn_exp); ldap_value_free(bind_dn_exp); |