1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00

r19079: talloc_array can fail

This commit is contained in:
Volker Lendecke 2006-10-04 20:59:06 +00:00 committed by Gerald (Jerry) Carter
parent 2b3b9ce2a1
commit 7b6738522a

View File

@ -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;