r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
[ira/wip.git] / source4 / libcli / ldap / ldap_client.c
index 84fd0f1d645dde4485c2e83d366b964158473dd3..c9e81ac28f47968f0958e5e37aa87361a69dd617 100644 (file)
@@ -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;
 }