mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Fix a memory leak introduced by changes to test_options.c
Since the FirewallPorts smartlist is now initialized, we can't just overwrite it.
This commit is contained in:
parent
5e2ffd6fd7
commit
bd518b9ab1
@ -1553,7 +1553,9 @@ test_options_validate__reachable_addresses(void *ignored)
|
||||
tdata = get_options_test_data("FascistFirewall 1\n"
|
||||
"ReachableDirAddresses *:81\n"
|
||||
"ReachableORAddresses *:444\n");
|
||||
tdata->opt->FirewallPorts = smartlist_new();
|
||||
tt_assert(tdata->opt->FirewallPorts);
|
||||
SMARTLIST_FOREACH(tdata->opt->FirewallPorts, char *, cp, tor_free(cp));
|
||||
smartlist_clear(tdata->opt->FirewallPorts);
|
||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||
tt_int_op(ret, OP_EQ, 0);
|
||||
#if 0
|
||||
|
Loading…
Reference in New Issue
Block a user