diff options
author | teor <teor2345@gmail.com> | 2015-06-13 21:28:02 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-06-17 09:18:32 -0400 |
commit | 75388f67c07d1a48c6fb9c5d1c4441ab66b644c0 (patch) | |
tree | bb925c15d51eb34bbe1f918850bba2eee95d45ab /src | |
parent | 8aa04408fb724d55e95419ec9f0568c7d733acb5 (diff) | |
download | tor-75388f67c07d1a48c6fb9c5d1c4441ab66b644c0.tar.gz tor-75388f67c07d1a48c6fb9c5d1c4441ab66b644c0.zip |
Correctly handle failed crypto_early_init
If crypto_early_init fails, a typo in a return value from tor_init
means that tor_main continues running, rather than returning
an error value.
Fixes bug 16360; bugfix on d3fb846d8c98 in 0.2.5.2-alpha,
introduced when implementing #4900.
Patch by "teor".
Diffstat (limited to 'src')
-rw-r--r-- | src/or/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c index 9c1cabf037..031f758f45 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2346,7 +2346,7 @@ tor_init(int argc, char *argv[]) /* Set up the crypto nice and early */ if (crypto_early_init() < 0) { log_err(LD_GENERAL, "Unable to initialize the crypto subsystem!"); - return 1; + return -1; } /* Initialize the history structures. */ |