summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r--source4/libcli/ldap/ldap.c14
-rw-r--r--source4/libcli/ldap/ldap_client.c6
-rw-r--r--source4/libcli/ldap/ldap_ldif.c8
3 files changed, 14 insertions, 14 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index b2a6bd957a..eab94bb194 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -130,7 +130,7 @@ static struct ldap_parse_tree *ldap_parse_simple(TALLOC_CTX *mem_ctx,
if (val && strchr("()&|", *val))
return NULL;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -157,7 +157,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
{
struct ldap_parse_tree *ret, *next;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -165,7 +165,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
ret->operation = op;
ret->u.list.num_elements = 1;
- ret->u.list.elements = talloc_p(mem_ctx, struct ldap_parse_tree *);
+ ret->u.list.elements = talloc(mem_ctx, struct ldap_parse_tree *);
if (!ret->u.list.elements) {
errno = ENOMEM;
return NULL;
@@ -180,7 +180,7 @@ 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_p(ret,
+ e = talloc_realloc(ret,
ret->u.list.elements,
struct ldap_parse_tree *,
ret->u.list.num_elements+1);
@@ -205,7 +205,7 @@ static struct ldap_parse_tree *ldap_parse_not(TALLOC_CTX *mem_ctx, const char *s
{
struct ldap_parse_tree *ret;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -448,7 +448,7 @@ BOOL ldap_encode(struct ldap_message *msg, DATA_BLOB *result)
ldap_push_filter(&data, tree);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
asn1_push_tag(&data, ASN1_SEQUENCE(0));
@@ -1186,7 +1186,7 @@ BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg)
for (i=0; asn1_peek_tag(data, ASN1_SEQUENCE(0)); i++) {
asn1_start_tag(data, ASN1_SEQUENCE(0));
- ctrl = talloc_realloc_p(msg->mem_ctx, ctrl, struct ldap_Control, i+1);
+ ctrl = talloc_realloc(msg->mem_ctx, ctrl, struct ldap_Control, i+1);
if (!ctrl) {
return False;
}
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 84fd0f1d64..c9e81ac28f 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -100,7 +100,7 @@ static struct ldap_connection *new_ldap_connection(TALLOC_CTX *mem_ctx)
{
struct ldap_connection *result;
- result = talloc_p(mem_ctx, struct ldap_connection);
+ result = talloc(mem_ctx, struct ldap_connection);
if (!result) {
return NULL;
@@ -158,7 +158,7 @@ struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx)
{
struct ldap_message *result;
- result = talloc_p(mem_ctx, struct ldap_message);
+ result = talloc(mem_ctx, struct ldap_message);
if (!result) {
return NULL;
@@ -472,7 +472,7 @@ int ldap_bind_sasl(struct ldap_connection *conn, const char *username, const cha
done:
if (mem_ctx)
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return result;
}
diff --git a/source4/libcli/ldap/ldap_ldif.c b/source4/libcli/ldap/ldap_ldif.c
index 809c75cf96..a0249a4ba0 100644
--- a/source4/libcli/ldap/ldap_ldif.c
+++ b/source4/libcli/ldap/ldap_ldif.c
@@ -159,7 +159,7 @@ static int next_attr(char **s, const char **attr, struct ldap_val *value)
BOOL add_value_to_attrib(TALLOC_CTX *mem_ctx, struct ldap_val *value,
struct ldap_attribute *attrib)
{
- attrib->values = talloc_realloc_p(mem_ctx,
+ attrib->values = talloc_realloc(mem_ctx,
attrib->values,
DATA_BLOB,
attrib->num_values+1);
@@ -177,7 +177,7 @@ BOOL add_attrib_to_array_talloc(TALLOC_CTX *mem_ctx,
struct ldap_attribute **attribs,
int *num_attribs)
{
- *attribs = talloc_realloc_p(mem_ctx,
+ *attribs = talloc_realloc(mem_ctx,
*attribs,
struct ldap_attribute,
*num_attribs+1);
@@ -211,7 +211,7 @@ static BOOL fill_add_attributes(struct ldap_message *msg, char **chunk)
}
if (attrib == NULL) {
- r->attributes = talloc_realloc_p(msg->mem_ctx,
+ r->attributes = talloc_realloc(msg->mem_ctx,
r->attributes,
struct ldap_attribute,
r->num_attributes+1);
@@ -236,7 +236,7 @@ BOOL add_mod_to_array_talloc(TALLOC_CTX *mem_ctx,
struct ldap_mod **mods,
int *num_mods)
{
- *mods = talloc_realloc_p(mem_ctx, *mods, struct ldap_mod, (*num_mods)+1);
+ *mods = talloc_realloc(mem_ctx, *mods, struct ldap_mod, (*num_mods)+1);
if (*mods == NULL)
return False;