summaryrefslogtreecommitdiff
path: root/modules/pam_ftp/pam_ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_ftp/pam_ftp.c')
-rw-r--r--modules/pam_ftp/pam_ftp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/pam_ftp/pam_ftp.c b/modules/pam_ftp/pam_ftp.c
index b2c32b74..41fb9f48 100644
--- a/modules/pam_ftp/pam_ftp.c
+++ b/modules/pam_ftp/pam_ftp.c
@@ -133,6 +133,8 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
retval = pam_set_item(pamh, PAM_USER, (const void *)anon_user);
if (retval != PAM_SUCCESS || anon_user == NULL) {
pam_syslog(pamh, LOG_ERR, "user resetting failed");
+ free(anon_user);
+
return PAM_USER_UNKNOWN;
}
free(anon_user);
@@ -155,7 +157,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
GUEST_LOGIN_PROMPT);
if (retval != PAM_SUCCESS) {
- _pam_overwrite (resp);
+ pam_overwrite_string (resp);
_pam_drop (resp);
return ((retval == PAM_CONV_AGAIN)
? PAM_INCOMPLETE:PAM_AUTHINFO_UNAVAIL);
@@ -194,7 +196,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
}
/* clean up */
- _pam_overwrite(resp);
+ pam_overwrite_string(resp);
_pam_drop(resp);
/* success or failure */