summaryrefslogtreecommitdiff
path: root/source3/libads/ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r--source3/libads/ldap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 97ccf76983..1ed1da0b5d 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -326,6 +326,8 @@ static struct berval *dup_berval(TALLOC_CTX *ctx, const struct berval *in_val)
if (!in_val) return NULL;
value = talloc_zero(ctx, sizeof(struct berval));
+ if (value == NULL)
+ return NULL;
if (in_val->bv_len == 0) return value;
value->bv_len = in_val->bv_len;