diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_policy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test_policy.c b/src/test/test_policy.c index d2ba1612de..491c9a21fb 100644 --- a/src/test/test_policy.c +++ b/src/test/test_policy.c @@ -417,8 +417,10 @@ test_dump_exit_policy_to_string(void *arg) done: - SMARTLIST_FOREACH(ri->exit_policy, addr_policy_t *, - entry, addr_policy_free(entry)); + if (ri->exit_policy) { + SMARTLIST_FOREACH(ri->exit_policy, addr_policy_t *, + entry, addr_policy_free(entry)); + } tor_free(ri); tor_free(ep); } |