diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-05-01 12:13:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-05-01 12:13:07 -0400 |
commit | b6c8a14bf35c4572fba49be9eb4aaaa78d776c4c (patch) | |
tree | 452e9c230c71131d20422d519ac05c95dd688c77 /src/or | |
parent | 1bbd3811c1c98e6a630ab96f15a376910a576626 (diff) | |
parent | 1ebdaf5788cb7969ee3f853ede4e6e3364343fc0 (diff) | |
download | tor-b6c8a14bf35c4572fba49be9eb4aaaa78d776c4c.tar.gz tor-b6c8a14bf35c4572fba49be9eb4aaaa78d776c4c.zip |
Merge remote-tracking branch 'public/bug4345a_024'
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/cpuworker.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 6b6a68afe5..61b2c29b38 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -528,7 +528,12 @@ spawn_cpuworker(void) tor_assert(SOCKET_OK(fdarray[1])); fd = fdarray[0]; - spawn_func(cpuworker_main, (void*)fdarray); + if (spawn_func(cpuworker_main, (void*)fdarray) < 0) { + tor_close_socket(fdarray[0]); + tor_close_socket(fdarray[1]); + tor_free(fdarray); + return -1; + } log_debug(LD_OR,"just spawned a cpu worker."); #ifndef TOR_IS_MULTITHREADED tor_close_socket(fdarray[1]); /* don't need the worker's side of the pipe */ |