From 06ac3dbd9aa90e1182106bea731642895b9045fe 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 441ad8a45c390f807a6ec5f27d585aad54f3b210) --- source4/lib/ldb/common/ldb_dn.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/ldb') 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; -- cgit