libwbclient: Make wbc_create_password_policy_info not use talloc
authorVolker Lendecke <vl@samba.org>
Sat, 3 Apr 2010 20:22:17 +0000 (22:22 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 19 Apr 2010 12:27:22 +0000 (14:27 +0200)
nsswitch/libwbclient/wbc_pam.c

index f66ea622bfa900fc81ac1224da6fa02dc8114211..8c6b4ef58a09d5e2e9b08d3e2eda52d92b18affe 100644 (file)
@@ -247,7 +247,8 @@ static wbcErr wbc_create_password_policy_info(const struct winbindd_response *re
        wbcErr wbc_status = WBC_ERR_SUCCESS;
        struct wbcUserPasswordPolicyInfo *i;
 
-       i = talloc(NULL, struct wbcUserPasswordPolicyInfo);
+       i = (struct wbcUserPasswordPolicyInfo *)wbcAllocateMemory(
+               sizeof(struct wbcUserPasswordPolicyInfo), 1, NULL);
        BAIL_ON_PTR_ERROR(i, wbc_status);
 
        i->min_passwordage      = resp->data.auth.policy.min_passwordage;
@@ -260,7 +261,7 @@ static wbcErr wbc_create_password_policy_info(const struct winbindd_response *re
        i = NULL;
 
 done:
-       talloc_free(i);
+       wbcFreeMemory(i);
        return wbc_status;
 }