diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-04-23 18:07:01 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2005-04-23 18:07:01 +0000 |
commit | ca1bd33688c302d234aaaa13dd4414944426fbdf (patch) | |
tree | 6a6a0f5adc293d7afd76f069ab8862b2f5878195 /source/auth | |
parent | 208374541caa953b032a4780bed24c9d10e411dc (diff) | |
download | samba-ca1bd33688c302d234aaaa13dd4414944426fbdf.tar.gz samba-ca1bd33688c302d234aaaa13dd4414944426fbdf.tar.xz samba-ca1bd33688c302d234aaaa13dd4414944426fbdf.zip |
r6445: Make us survive the PARANOID_MALLOC_CHECKER. Should we enable that for
--enable-developer=yes?
Volker
Diffstat (limited to 'source/auth')
-rw-r--r-- | source/auth/auth_util.c | 2 | ||||
-rw-r--r-- | source/auth/pampass.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c index a50a449815c..30933c6c938 100644 --- a/source/auth/auth_util.c +++ b/source/auth/auth_util.c @@ -607,7 +607,7 @@ static NTSTATUS create_nt_user_token(const DOM_SID *user_sid, const DOM_SID *gro group_sidstr, sidstr); } - command = strdup(lp_log_nt_token_command()); + command = SMB_STRDUP(lp_log_nt_token_command()); command = realloc_string_sub(command, "%s", user_sidstr); command = realloc_string_sub(command, "%t", group_sidstr); DEBUG(8, ("running command: [%s]\n", command)); diff --git a/source/auth/pampass.c b/source/auth/pampass.c index 68c2f183f17..5a40bf6c477 100644 --- a/source/auth/pampass.c +++ b/source/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 = SMB_MALLOC_ARRAY(struct pam_response, num_msg); if (!reply) return PAM_CONV_ERR; @@ -211,7 +211,7 @@ static struct chat_struct *make_pw_chat(char *p) struct chat_struct *tmp; while (1) { - t = (struct chat_struct *)malloc(sizeof(*t)); + t = SMB_MALLOC_P(struct chat_struct); if (!t) { DEBUG(0,("make_pw_chat: malloc failed!\n")); return NULL; @@ -290,7 +290,7 @@ static int smb_pam_passchange_conv(int num_msg, return PAM_CONV_ERR; } - reply = malloc(sizeof(struct pam_response) * num_msg); + reply = SMB_MALLOC_ARRAY(struct pam_response, num_msg); if (!reply) { DEBUG(0,("smb_pam_passchange_conv: malloc for reply failed!\n")); free_pw_chat(pw_chat); @@ -406,8 +406,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 = SMB_MALLOC_P(struct pam_conv); + struct smb_pam_userdata *udp = SMB_MALLOC_P(struct smb_pam_userdata); if (pconv == NULL || udp == NULL) { SAFE_FREE(pconv); |