diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-01-15 11:45:19 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-01-15 11:45:19 -0500 |
commit | da4dbb29b77bc6769781bf2eb38fd5364f232a54 (patch) | |
tree | ac940a0a7c699b4d855849fd2d2172f6eee2f78a /src/test/test_dir_common.c | |
parent | f6ea7a62580da2efbadeabbd82e8c1df5ac925e1 (diff) | |
download | tor-da4dbb29b77bc6769781bf2eb38fd5364f232a54.tar.gz tor-da4dbb29b77bc6769781bf2eb38fd5364f232a54.zip |
Fix some leaks in the unit tests.
Diffstat (limited to 'src/test/test_dir_common.c')
-rw-r--r-- | src/test/test_dir_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c index 44ea93b437..f9e97c973c 100644 --- a/src/test/test_dir_common.c +++ b/src/test/test_dir_common.c @@ -362,7 +362,8 @@ dir_common_construct_vote_2(networkstatus_t **vote, authority_cert_t *cert, */ smartlist_add((*vote)->voters, voter); (*vote)->cert = authority_cert_dup(cert); - (*vote)->net_params = smartlist_new(); + if (! (*vote)->net_params) + (*vote)->net_params = smartlist_new(); smartlist_split_string((*vote)->net_params, "bar=2000000000 circuitwindow=20", NULL, 0, 0); |