summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap/ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/ldap/ldap.c')
-rw-r--r--source4/libcli/ldap/ldap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index a94a4f2f30..af21962265 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -179,9 +179,10 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
while (*s && (next = ldap_parse_filter(mem_ctx, &s))) {
struct ldap_parse_tree **e;
- e = talloc_realloc(ret->u.list.elements,
- sizeof(struct ldap_parse_tree) *
- (ret->u.list.num_elements+1));
+ e = talloc_realloc_p(ret,
+ ret->u.list.elements,
+ struct ldap_parse_tree *,
+ ret->u.list.num_elements+1);
if (!e) {
errno = ENOMEM;
return NULL;