diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-03-26 17:35:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-03-26 17:35:21 -0400 |
commit | 55e991b27ca40f5e1cdf33a85a27db5eff5f19d5 (patch) | |
tree | 61b621a656e78b7d8abd8e423e099682f6e2f35c /evutil_rand.c | |
parent | 43d5389c806b74a682d3e5c13bdd124ee9bfbd48 (diff) | |
download | libevent-55e991b27ca40f5e1cdf33a85a27db5eff5f19d5.tar.gz |
Make libevent_global_shutdown() idempotent
Two calls to libevent_global_shutdown on your exit path shouldn't
result in a crash.
Diffstat (limited to 'evutil_rand.c')
-rw-r--r-- | evutil_rand.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/evutil_rand.c b/evutil_rand.c index 9259335c..dd566bac 100644 --- a/evutil_rand.c +++ b/evutil_rand.c @@ -124,6 +124,7 @@ evutil_free_secure_rng_globals_locks(void) #ifndef EVENT__DISABLE_THREAD_SUPPORT if (arc4rand_lock != NULL) { EVTHREAD_FREE_LOCK(arc4rand_lock, 0); + arc4rand_lock = NULL; } #endif return; |