diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-06-30 06:56:00 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-06-30 06:56:00 +0000 |
commit | 584a0ae397bbe049c860bbc83f5a1c0152c3c4b7 (patch) | |
tree | d3923e293edb01eea97013d104192b145b9563dd /src/common | |
parent | 8fd197c6871f5f54dee3f3dc90cb81c0d52efaf8 (diff) | |
download | tor-584a0ae397bbe049c860bbc83f5a1c0152c3c4b7.tar tor-584a0ae397bbe049c860bbc83f5a1c0152c3c4b7.tar.gz |
Fix an fd leak in start_daemon
svn:r4508
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 191ef738f..bbe31ff11 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1418,6 +1418,8 @@ void finish_daemon(const char *desired_cwd) log_fn(LOG_ERR,"dup2 failed. Exiting."); exit(1); } + if (nullfd > 2) + close(nullfd); write(daemon_filedes[1], &c, sizeof(char)); /* signal success */ close(daemon_filedes[1]); } |