From 407873df53db6fb7302ffda53de214e64cd75a09 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Oct 2006 20:59:06 +0000 Subject: r19079: talloc_array can fail (This used to be commit 7b6738522a80740824f3b96e73e7c48a0623b1b1) --- source3/lib/ldb/common/ldb_dn.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/ldb') 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; -- cgit