[tor-commits] [tor/master] Explicitly set bucket_cfg to NULL after we freed it

nickm at torproject.org nickm at torproject.org
Thu Sep 1 14:46:09 UTC 2011


commit ebb5f8df368c29dd26080ba057ffb6611aee401b
Author: Sebastian Hahn <sebastian at torproject.org>
Date:   Thu Sep 1 12:24:05 2011 +0200

    Explicitly set bucket_cfg to NULL after we freed it
    
    This should fix bug 3888.
---
 src/or/connection.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/or/connection.c b/src/or/connection.c
index 7615952..1b227d7 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -524,6 +524,7 @@ _connection_free(connection_t *conn)
 #ifdef USE_BUFFEREVENTS
   if (conn->type == CONN_TYPE_OR && TO_OR_CONN(conn)->bucket_cfg) {
     ev_token_bucket_cfg_free(TO_OR_CONN(conn)->bucket_cfg);
+    TO_OR_CONN(conn)->bucket_cfg = NULL;
   }
 #endif
 





More information about the tor-commits mailing list