Call login_close() to prevent parent from memory leaking in some
cases due to vfork()
This commit is contained in:
parent
9fb5801442
commit
3d99cebff4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62376
@ -251,6 +251,8 @@ child_process(e, u)
|
||||
setuid(e->uid); /* we aren't root after this..*/
|
||||
#if defined(LOGIN_CAP)
|
||||
}
|
||||
if (lc != NULL)
|
||||
login_close(lc);
|
||||
#endif
|
||||
chdir(env_get("HOME", e->envp));
|
||||
|
||||
|
@ -182,6 +182,8 @@ cron_popen(program, type, e)
|
||||
setuid(e->uid); /* we aren't root after this..*/
|
||||
#if defined(LOGIN_CAP)
|
||||
}
|
||||
if (lc != NULL)
|
||||
login_close(lc);
|
||||
#endif
|
||||
chdir(env_get("HOME", e->envp));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user