diff options
-rw-r--r-- | source3/lib/ldb/common/ldb_dn.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/lib/ldb/common/ldb_dn.c b/source3/lib/ldb/common/ldb_dn.c index f1d0f185ad..f9b044d5b8 100644 --- a/source3/lib/ldb/common/ldb_dn.c +++ b/source3/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; |