diff options
author | Kevin Steves <stevesk@pobox.com> | 2002-07-23 02:44:07 +0200 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2002-07-23 02:44:07 +0200 |
commit | 38b050a0f526d1b7982deb9d19f59c95f7b91b22 (patch) | |
tree | 7594cc4c8543dd983ddbafea6170ebcacffa1847 /session.c | |
parent | - (bal) [monitor_mm.c openbsd-compat/xmmap.h] Move xmmap() defines (diff) | |
download | openssh-38b050a0f526d1b7982deb9d19f59c95f7b91b22.tar.xz openssh-38b050a0f526d1b7982deb9d19f59c95f7b91b22.zip |
- (stevesk) [auth-pam.[ch] session.c] pam_getenvlist() must be
freed by the caller; add free_pam_environment() and use it.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1042,8 +1042,17 @@ do_setup_env(Session *s, const char *shell) s->authctxt->krb5_ticket_file); #endif #ifdef USE_PAM - /* Pull in any environment variables that may have been set by PAM. */ - copy_environment(fetch_pam_environment(), &env, &envsize); + /* + * Pull in any environment variables that may have + * been set by PAM. + */ + { + char **p; + + p = fetch_pam_environment(); + copy_environment(p, &env, &envsize); + free_pam_environment(p); + } #endif /* USE_PAM */ if (auth_sock_name != NULL) |