- (stevesk) [auth-pam.[ch] session.c] pam_getenvlist() must be
   freed by the caller; add free_pam_environment() and use it.
diff --git a/auth-pam.c b/auth-pam.c
index 79af58a..8e14982 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -38,7 +38,7 @@
 
 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 @@
 #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)