mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
Make unit tests run without segfaulting
svn:r4804
This commit is contained in:
parent
9321db8c29
commit
9b6eeb81aa
2 changed files with 6 additions and 1 deletions
|
@ -871,6 +871,9 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires, time_t max_expires)
|
|||
void *_val;
|
||||
addressmap_entry_t *val;
|
||||
|
||||
if (!addressmap)
|
||||
addressmap_init();
|
||||
|
||||
for (iter = strmap_iter_init(addressmap); !strmap_iter_done(iter); ) {
|
||||
strmap_iter_get(iter, &key, &_val);
|
||||
val = _val;
|
||||
|
|
|
@ -1525,11 +1525,13 @@ main(int c, char**v)
|
|||
{
|
||||
or_options_t *options = options_new();
|
||||
network_init();
|
||||
setup_directory();
|
||||
options_init(options);
|
||||
options->DataDirectory = tor_strdup(temp_dir);
|
||||
set_options(options);
|
||||
|
||||
crypto_seed_rng();
|
||||
setup_directory();
|
||||
|
||||
rep_hist_init();
|
||||
atexit(remove_directory);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue