[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.2.1] Make crypto_free_pk_env tolerate NULL arg in 0.2.1. Error-proofing against bug 988 backport



commit 299a78c5fed3447a450cea3d4f686c2140c7aaed
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Nov 12 20:21:50 2010 -0500

    Make crypto_free_pk_env tolerate NULL arg in 0.2.1.  Error-proofing against bug 988 backport
---
 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 dffa2c7..c723c33 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;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits