Slightly tune previous fix: free memory if !export

This commit is contained in:
ache 2007-04-30 12:54:02 +00:00
parent 123c99294b
commit 73001d272d

View File

@ -745,8 +745,8 @@ export_pam_environment()
pam_env = pam_getenvlist(pamh);
if (pam_env != NULL) {
for (pp = pam_env; *pp != NULL; pp++) {
(void)export(*pp);
/* Don't free putenv() memory! */
if (!export(*pp))
free(*pp);
}
}
}