Plug memory leak on fork(2) failure.

Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2010-09-26 10:39:01 +00:00
parent 1d5b5089aa
commit b71de2e057
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213183

View File

@ -388,6 +388,7 @@ hook_execv(const char *path, va_list ap)
switch (pid) {
case -1: /* Error. */
pjdlog_errno(LOG_ERR, "Unable to fork to execute %s", path);
hook_free(hp);
return;
case 0: /* Child. */
descriptors();