summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_ldap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 15:35:28 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:06:54 -0700
commit526e875cec15761099438e17df3f56bc2bd5b761 (patch)
tree8ad776c58b3a25b8739b03cdaf330c295bc570b7 /source3/winbindd/idmap_ldap.c
parente1ec86a49ce1d7c3ebe99fc175ffad70a03c4a0b (diff)
downloadsamba-526e875cec15761099438e17df3f56bc2bd5b761.tar.gz
Check error returns from strupper_m() (in all reasonable places).
Diffstat (limited to 'source3/winbindd/idmap_ldap.c')
-rw-r--r--source3/winbindd/idmap_ldap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index aeeb2e87d0f..e72a0ab1849 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -50,7 +50,12 @@ static char *idmap_fetch_secret(const char *backend,
if (r < 0)
return NULL;
- strupper_m(tmp); /* make sure the key is case insensitive */
+ /* make sure the key is case insensitive */
+ if (!strupper_m(tmp)) {
+ SAFE_FREE(tmp);
+ return NULL;
+ }
+
ret = secrets_fetch_generic(tmp, identity);
SAFE_FREE(tmp);