mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
scan-build: fix a crash-on-fail possibility in test_policy.c
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user