mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
scan-build: fix a crash-on-fail possibility in test_policy.c
This commit is contained in:
parent
0fd0f5f7a9
commit
69ea4450ca
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user