r13737@catbus: nickm | 2007-07-12 12:57:30 -0400

Backport r10521: Fix a memory leak


svn:r10816
This commit is contained in:
Nick Mathewson 2007-07-12 17:00:42 +00:00
parent afd0f2d13b
commit cce7548d0c
3 changed files with 13 additions and 6 deletions

View File

@ -37,6 +37,7 @@ Changes in version 0.1.2.15 - 2007-0?-??
- Fix a possible (but very unlikely) bug in picking routers by bandwidth.
Add a log message to confirm that it is in fact unlikely. (Patch from
lodger.)
- Backport a couple of memory leak fixes.
- Backport miscellaneous cosmetic bugfixes.

View File

@ -8,11 +8,10 @@ Backport items for 0.1.2:
a nonexistent hidden service port
o r10493: weight guard selection by bandwidth
o r10495: change an assert into a tor_assert
- r10521: fix an impossible^Wapparently real memory leak
o r10521: fix an impossible^Wapparently real memory leak
o r10524: make the LICENSE and AUTHORS files mention Tor.
o r10563: use correct types with desc_digest_map.
o r10566: build correctly on systems where size_t is bigger than ulong.
- r10579: new addsysuser implementation for osx (??)
o r10643: eventdns.c behavior fix for solaris.
- r10730: Don't choose guards after any never-connected-to guard. (??)
o r10760: fix possible buffer overrun in old BSD natd code
@ -20,4 +19,8 @@ Backport items for 0.1.2:
- Some fix for bug 455.
Backport for 0.1.2.x once better tested:
- r10579: new addsysuser implementation for osx (??)

View File

@ -2255,10 +2255,8 @@ static void
entry_guards_prepend_from_config(void)
{
or_options_t *options = get_options();
smartlist_t *entry_routers = smartlist_create();
smartlist_t *old_entry_guards_on_list = smartlist_create();
smartlist_t *old_entry_guards_not_on_list = smartlist_create();
smartlist_t *entry_fps = smartlist_create();
smartlist_t *entry_routers, *entry_fps;
smartlist_t *old_entry_guards_on_list, *old_entry_guards_not_on_list;
tor_assert(entry_guards);
should_add_entry_nodes = 0;
@ -2274,6 +2272,11 @@ entry_guards_prepend_from_config(void)
log_info(LD_CIRC,"Adding configured EntryNodes '%s'.",
options->EntryNodes);
entry_routers = smartlist_create();
entry_fps = smartlist_create();
old_entry_guards_on_list = smartlist_create();
old_entry_guards_not_on_list = smartlist_create();
/* Split entry guards into those on the list and those not. */
add_nickname_list_to_smartlist(entry_routers, options->EntryNodes, 0);
SMARTLIST_FOREACH(entry_routers, routerinfo_t *, ri,