diff options
Diffstat (limited to 'modules/pam_listfile')
-rw-r--r-- | modules/pam_listfile/pam_listfile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/pam_listfile/pam_listfile.c b/modules/pam_listfile/pam_listfile.c index a01b5a8a..3e6a7092 100644 --- a/modules/pam_listfile/pam_listfile.c +++ b/modules/pam_listfile/pam_listfile.c @@ -106,10 +106,9 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, } else if(!strcmp(mybuf,"file")) { free(ifname); - ifname = malloc(strlen(myval)+1); + ifname = strdup(myval); if (!ifname) return PAM_BUF_ERR; - strcpy(ifname,myval); } else if(!strcmp(mybuf,"item")) if(!strcmp(myval,"user")) citem = PAM_USER; |