Slightly tune previous fix: free memory if !export
This commit is contained in:
parent
123c99294b
commit
73001d272d
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user