From 6225f763fc27b7b0a888309f415b219366ee096a Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Mon, 5 Sep 2005 19:45:37 +0000 Subject: [PATCH] Relevant BUGIDs: none Purpose of commit: cleanup Commit summary: --------------- Remove duplicate check for NULL variable (Dmitry V. Levin) --- libpam/pam_handlers.c | 3 +-- modules/pam_ftp/pam_ftp.c | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c index db69662c..76af72c4 100644 --- a/libpam/pam_handlers.c +++ b/libpam/pam_handlers.c @@ -1043,8 +1043,7 @@ void _pam_free_handlers_aux(struct handler **hp) while (h) { last = h; _pam_drop(h->argv); /* This is all alocated in a single chunk */ - if (h->mod_name) - _pam_drop(h->mod_name); + _pam_drop(h->mod_name); h = h->next; memset(last, 0, sizeof(*last)); free(last); diff --git a/modules/pam_ftp/pam_ftp.c b/modules/pam_ftp/pam_ftp.c index 552858ba..49f59bc8 100644 --- a/modules/pam_ftp/pam_ftp.c +++ b/modules/pam_ftp/pam_ftp.c @@ -174,8 +174,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, GUEST_LOGIN_PROMPT); if (retval != PAM_SUCCESS) { - if (resp != NULL) - _pam_drop (resp); + _pam_drop (resp); return ((retval == PAM_CONV_AGAIN) ? PAM_INCOMPLETE:PAM_AUTHINFO_UNAVAIL); } @@ -211,9 +210,8 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, retval = PAM_AUTH_ERR; } - if (resp) { /* clean up */ - _pam_drop(resp); - } + /* clean up */ + _pam_drop(resp); /* success or failure */ -- 2.40.0