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:
parent
2b3b9ce2a1
commit
7b6738522a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user