Call login_close() to prevent parent from memory leaking in some

cases due to vfork()
This commit is contained in:
Andrey A. Chernov 2000-07-02 04:15:15 +00:00
parent 9fb5801442
commit 3d99cebff4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62376
2 changed files with 4 additions and 0 deletions

View File

@ -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));

View File

@ -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));
}