/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2014-06-14 02:52:31 UTC
  • Revision ID: teddy@recompile.se-20140614025231-xpairrn1olkfgsek
plugin-runner: Do not leak file descriptors on certain errors.

* plugin-runner.c (main): If set_cloexec_flag fails, close pipe FD's.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1014
1014
    } while(pid == -1 and errno == EINTR);
1015
1015
    if(pid == -1){
1016
1016
      error(0, errno, "fork");
1017
 
      TEMP_FAILURE_RETRY(sigprocmask(SIG_UNBLOCK,
1018
 
                                     &sigchld_action.sa_mask, NULL));
1019
 
      TEMP_FAILURE_RETRY(close(pipefd[0]));
1020
 
      TEMP_FAILURE_RETRY(close(pipefd[1]));
1021
1017
      exitstatus = EX_OSERR;
1022
1018
      goto fallback;
1023
1019
    }