diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-03 07:20:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:20 -0500 |
commit | 6e6374cb5bcffb4df8bdb0a83327fff92b61ac84 (patch) | |
tree | fa45bc8c1a7281492f39069e5edd86da6d0c5d4e /source4/auth | |
parent | e5ce904ddbd6175ba86ed827bf096b76b11b5511 (diff) | |
download | samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.gz samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.xz samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.zip |
r4055: fixed more places to use type safe allocation macros
(This used to be commit eec698254f67365f27b4b7569fa982e22472aca1)
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/pampass.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/auth/pampass.c b/source4/auth/pampass.c index a5c9a5de16a..8612aa9ac0b 100644 --- a/source4/auth/pampass.c +++ b/source4/auth/pampass.c @@ -130,7 +130,7 @@ static int smb_pam_conv(int num_msg, return PAM_CONV_ERR; } - reply = malloc(sizeof(struct pam_response) * num_msg); + reply = malloc_array_p(struct pam_response, num_msg); if (!reply) return PAM_CONV_ERR; @@ -210,7 +210,7 @@ static struct chat_struct *make_pw_chat(char *p) struct chat_struct *t; while (1) { - t = (struct chat_struct *)malloc(sizeof(*t)); + t = malloc_p(struct chat_struct); if (!t) { DEBUG(0,("make_pw_chat: malloc failed!\n")); return NULL; @@ -289,7 +289,7 @@ static int smb_pam_passchange_conv(int num_msg, return PAM_CONV_ERR; } - reply = malloc(sizeof(struct pam_response) * num_msg); + reply = malloc_array_p(struct pam_response, num_msg); if (!reply) { DEBUG(0,("smb_pam_passchange_conv: malloc for reply failed!\n")); free_pw_chat(pw_chat); @@ -405,8 +405,8 @@ static void smb_free_pam_conv(struct pam_conv *pconv) static struct pam_conv *smb_setup_pam_conv(smb_pam_conv_fn smb_pam_conv_fnptr, const char *user, const char *passwd, const char *newpass) { - struct pam_conv *pconv = (struct pam_conv *)malloc(sizeof(struct pam_conv)); - struct smb_pam_userdata *udp = (struct smb_pam_userdata *)malloc(sizeof(struct smb_pam_userdata)); + struct pam_conv *pconv = malloc_p(struct pam_conv); + struct smb_pam_userdata *udp = malloc_p(struct smb_pam_userdata); if (pconv == NULL || udp == NULL) { SAFE_FREE(pconv); |