From 299a78c5fed3447a450cea3d4f686c2140c7aaed Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 12 Nov 2010 20:21:50 -0500 Subject: Make crypto_free_pk_env tolerate NULL arg in 0.2.1. Error-proofing against bug 988 backport --- src/common/crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/crypto.c b/src/common/crypto.c index dffa2c780..c723c33dd 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; -- cgit v1.2.3