mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Try to hunt down a few more leaks
svn:r5172
This commit is contained in:
parent
80f2e10228
commit
23864ad423
@ -1303,6 +1303,7 @@ static int
|
|||||||
tor_init(int argc, char *argv[])
|
tor_init(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
time_of_process_start = time(NULL);
|
time_of_process_start = time(NULL);
|
||||||
|
if (!closeable_connection_lst)
|
||||||
closeable_connection_lst = smartlist_create();
|
closeable_connection_lst = smartlist_create();
|
||||||
/* Initialize the history structures. */
|
/* Initialize the history structures. */
|
||||||
rep_hist_init();
|
rep_hist_init();
|
||||||
|
@ -93,6 +93,8 @@ router_reload_networkstatus(void)
|
|||||||
tor_free(s);
|
tor_free(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
SMARTLIST_FOREACH(entries, char *, fn, tor_free(fn));
|
||||||
|
smartlist_free(entries);
|
||||||
networkstatus_list_clean(time(NULL));
|
networkstatus_list_clean(time(NULL));
|
||||||
routers_update_all_from_networkstatus();
|
routers_update_all_from_networkstatus();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -642,13 +642,11 @@ int
|
|||||||
router_parse_list_from_string(const char **s, smartlist_t *dest)
|
router_parse_list_from_string(const char **s, smartlist_t *dest)
|
||||||
{
|
{
|
||||||
routerinfo_t *router;
|
routerinfo_t *router;
|
||||||
smartlist_t *routers;
|
|
||||||
const char *end;
|
const char *end;
|
||||||
|
|
||||||
tor_assert(s);
|
tor_assert(s);
|
||||||
tor_assert(*s);
|
tor_assert(*s);
|
||||||
|
tor_assert(dest);
|
||||||
routers = smartlist_create();
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
*s = eat_whitespace(*s);
|
*s = eat_whitespace(*s);
|
||||||
@ -670,11 +668,9 @@ router_parse_list_from_string(const char **s, smartlist_t *dest)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
smartlist_add(routers, router);
|
smartlist_add(dest, router);
|
||||||
}
|
}
|
||||||
|
|
||||||
smartlist_add_all(dest, routers);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user