diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2004-09-22 09:37:46 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2004-09-22 09:37:46 +0000 |
commit | 6e99aa00d23a68650fdd4fae01aab812dcfe10eb (patch) | |
tree | 0b929b30fa38ed1d402515fbf9d7d8cf6dcb5284 /modules/pam_ftp/pam_ftp.c | |
parent | e1f75a80821125170e23a9b920d138a4a952c708 (diff) | |
download | pam-6e99aa00d23a68650fdd4fae01aab812dcfe10eb.tar.gz pam-6e99aa00d23a68650fdd4fae01aab812dcfe10eb.tar.bz2 pam-6e99aa00d23a68650fdd4fae01aab812dcfe10eb.zip |
Relevant BUGIDs:
Purpose of commit:
Commit summary:
---------------
bugfix: Add rest of Steve Grubb's resource leak and other fixes
Diffstat (limited to 'modules/pam_ftp/pam_ftp.c')
-rw-r--r-- | modules/pam_ftp/pam_ftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/pam_ftp/pam_ftp.c b/modules/pam_ftp/pam_ftp.c index bebcd2b2..e95b7d78 100644 --- a/modules/pam_ftp/pam_ftp.c +++ b/modules/pam_ftp/pam_ftp.c @@ -58,7 +58,7 @@ static int converse(pam_handle_t *pamh, int nargs D(("begin to converse\n")); retval = pam_get_item( pamh, PAM_CONV, (const void **) &conv ) ; - if ( retval == PAM_SUCCESS ) { + if ( retval == PAM_SUCCESS && conv ) { retval = conv->conv(nargs, ( const struct pam_message ** ) message , response, conv->appdata_ptr); @@ -73,6 +73,8 @@ static int converse(pam_handle_t *pamh, int nargs } else { _pam_log(LOG_ERR, "couldn't obtain coversation function [%s]" , pam_strerror(pamh, retval)); + if (retval == PAM_SUCCESS) + retval = PAM_BAD_ITEM; /* conv was NULL */ } D(("ready to return from module conversation\n")); |