diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-11-12 20:21:50 -0500 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-10-26 14:14:05 +0200 |
commit | 299a78c5fed3447a450cea3d4f686c2140c7aaed (patch) | |
tree | cb90722d95b879ccfb11be4cc907cb4084560b80 | |
parent | 9976df9e5619b89339390c322138f7228b8fa715 (diff) | |
download | tor-299a78c5fed3447a450cea3d4f686c2140c7aaed.tar.gz tor-299a78c5fed3447a450cea3d4f686c2140c7aaed.zip |
Make crypto_free_pk_env tolerate NULL arg in 0.2.1. Error-proofing against bug 988 backport
-rw-r--r-- | src/common/crypto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index dffa2c7807..c723c33dd0 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -321,7 +321,8 @@ crypto_new_pk_env(void) void crypto_free_pk_env(crypto_pk_env_t *env) { - tor_assert(env); + if (!env) + return; if (--env->refs > 0) return; |