summaryrefslogtreecommitdiff
path: root/source3/utils/net_idmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_idmap.c')
-rw-r--r--source3/utils/net_idmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c
index f067071de1..ebc14e528d 100644
--- a/source3/utils/net_idmap.c
+++ b/source3/utils/net_idmap.c
@@ -492,7 +492,11 @@ static bool idmap_store_secret(const char *backend,
if (r < 0) return false;
- strupper_m(tmp); /* make sure the key is case insensitive */
+ /* make sure the key is case insensitive */
+ if (!strupper_m(tmp)) {
+ free(tmp);
+ return false;
+ }
ret = secrets_store_generic(tmp, identity, secret);
free(tmp);