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:
parent
1d5b5089aa
commit
b71de2e057
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user