Commit 34b4da70 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Fix a bunch more memory leaks in the tests.

parent b7941cbf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -329,7 +329,9 @@ into test/slow if it genuinely needs to be run.
Tests should not alter global state unless they run with TT_FORK: Tests
should not require other tests to be run before or after them.

Tests should not leak memory or other resources.
Tests should not leak memory or other resources.  To find out if your tests
are leaking memory, run them under valgrind (see HelpfulTools.txt for more
information on how to do that).

When possible, tests should not be over-fit to the implementation.  That is,
the test should verify that the documented behavior is implemented, but
+2 −1
Original line number Diff line number Diff line
@@ -416,9 +416,10 @@ validate_intro_point_failure(const rend_service_descriptor_t *desc,
      /* This intro point is in our cache, discard it from the descriptor
       * because chances are that it's unusable. */
      SMARTLIST_DEL_CURRENT(desc->intro_nodes, intro);
      rend_intro_point_free(intro);
      /* Keep it for our new entry. */
      digestmap_set(new_entry->intro_failures, (char *) identity, ent_dup);
      rend_intro_point_free(intro);

      continue;
    }
  } SMARTLIST_FOREACH_END(intro);
+114 −49

File changed.

Preview size limit exceeded, changes collapsed.