diff options
Diffstat (limited to 'sesman/verify_user_pam.c')
-rw-r--r-- | sesman/verify_user_pam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sesman/verify_user_pam.c b/sesman/verify_user_pam.c index 29f21225..43783211 100644 --- a/sesman/verify_user_pam.c +++ b/sesman/verify_user_pam.c @@ -54,7 +54,7 @@ verify_pam_conv(int num_msg, const struct pam_message **msg, struct pam_response *reply; struct t_user_pass *user_pass; - reply = g_malloc(sizeof(struct pam_response) * num_msg, 1); + reply = g_new0(struct pam_response, num_msg); for (i = 0; i < num_msg; i++) { @@ -109,7 +109,7 @@ auth_userpass(char *user, char *pass, int *errorcode) char service_name[256]; get_service_name(service_name); - auth_info = g_malloc(sizeof(struct t_auth_info), 1); + auth_info = g_new0(struct t_auth_info, 1); g_strncpy(auth_info->user_pass.user, user, 255); g_strncpy(auth_info->user_pass.pass, pass, 255); auth_info->pamc.conv = &verify_pam_conv; |