Kaynağa Gözat

Explicitly set bucket_cfg to NULL after we freed it

This should fix bug 3888.
Sebastian Hahn 14 yıl önce
ebeveyn
işleme
ebb5f8df36
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      src/or/connection.c

+ 1 - 0
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