Explorar o código

Explicitly set bucket_cfg to NULL after we freed it

This should fix bug 3888.
Sebastian Hahn %!s(int64=14) %!d(string=hai) anos
pai
achega
ebb5f8df36
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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