diff options
author | Kevin Steves <stevesk@pobox.com> | 2002-07-23 00:44:07 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2002-07-23 00:44:07 +0000 |
commit | 38b050a0f526d1b7982deb9d19f59c95f7b91b22 (patch) | |
tree | 7594cc4c8543dd983ddbafea6170ebcacffa1847 /auth-pam.c | |
parent | 446d886fa5b295b03031de840286dbe4b7d904a3 (diff) |
- (stevesk) [auth-pam.[ch] session.c] pam_getenvlist() must be
freed by the caller; add free_pam_environment() and use it.
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -38,7 +38,7 @@ extern char *__progname; extern int use_privsep; -RCSID("$Id: auth-pam.c,v 1.51 2002/07/21 23:59:39 stevesk Exp $"); +RCSID("$Id: auth-pam.c,v 1.52 2002/07/23 00:44:07 stevesk Exp $"); #define NEW_AUTHTOK_MSG \ "Warning: Your password has expired, please change it now." @@ -421,6 +421,16 @@ char **fetch_pam_environment(void) #endif /* HAVE_PAM_GETENVLIST */ } +void free_pam_environment(char **env) +{ + int i; + + if (env != NULL) { + for (i = 0; env[i] != NULL; i++) + xfree(env[i]); + } +} + /* Print any messages that have been generated during authentication */ /* or account checking to stderr */ void print_pam_messages(void) |