Skip to content
Snippets Groups Projects
Commit 69ea4450 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

scan-build: fix a crash-on-fail possibility in test_policy.c

parent 0fd0f5f7
Branches
Tags
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment