summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/common/ldb_dn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index f1d0f185ad..f9b044d5b8 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -698,6 +698,7 @@ struct ldb_dn *ldb_dn_copy_partial(void *mem_ctx, const struct ldb_dn *dn, int n
newdn->comp_num = num_el;
n = newdn->comp_num - 1;
newdn->components = talloc_array(newdn, struct ldb_dn_component, newdn->comp_num);
+ if (newdn->components == NULL) goto failed;
if (dn->comp_num == 0) return newdn;
e = dn->comp_num - 1;