summaryrefslogtreecommitdiffstats
path: root/source3/libads/ldap_user.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-23 22:12:23 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-23 22:12:23 +0100
commit5c75b65ca15f7c71babd835a45b252fed6534acf (patch)
tree6b8baa3f5d27c4eafd89fece7deedae30a6ff1fd /source3/libads/ldap_user.c
parent86cee0b28c50dd849fe919bbe3faa4deba5275bf (diff)
parentff26cb4b1c1d0292231e1cfc0490f4be6040d3e3 (diff)
downloadsamba-5c75b65ca15f7c71babd835a45b252fed6534acf.tar.gz
samba-5c75b65ca15f7c71babd835a45b252fed6534acf.tar.xz
samba-5c75b65ca15f7c71babd835a45b252fed6534acf.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/libads/ldap_user.c')
-rw-r--r--source3/libads/ldap_user.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c
index bef2c91292..eecd9045e5 100644
--- a/source3/libads/ldap_user.c
+++ b/source3/libads/ldap_user.c
@@ -35,7 +35,10 @@
return ADS_ERROR(LDAP_NO_MEMORY);
}
- asprintf(&ldap_exp, "(samAccountName=%s)", escaped_user);
+ if (asprintf(&ldap_exp, "(samAccountName=%s)", escaped_user) == -1) {
+ SAFE_FREE(escaped_user);
+ return ADS_ERROR(LDAP_NO_MEMORY);
+ }
status = ads_search(ads, res, ldap_exp, attrs);
SAFE_FREE(ldap_exp);
SAFE_FREE(escaped_user);