aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-10-11 02:03:53 +0000
committerRoger Dingledine <arma@torproject.org>2007-10-11 02:03:53 +0000
commit900ddcb8fdc46efb25764582fd8569b94b3cf20a (patch)
tree9ecc6ff1f01fadb85578a75fb73c1ba14f75d89f /src/or/circuitbuild.c
parent487f985f5b6213b81410c6cae49d12b14ebd979d (diff)
downloadtor-900ddcb8fdc46efb25764582fd8569b94b3cf20a.tar.gz
tor-900ddcb8fdc46efb25764582fd8569b94b3cf20a.zip
bugfix on r11298:
Fix a minor memory leak whenever we parse guards from our state file. Bugfix on 0.2.0.7-alpha. svn:r11862
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 0db6908f61..53555b215c 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2404,7 +2404,7 @@ entry_guards_prepend_from_config(void)
/* Finally, the remaining EntryNodes, unless we're strict */
if (options->StrictEntryNodes) {
SMARTLIST_FOREACH(old_entry_guards_not_on_list, entry_guard_t *, e,
- tor_free(e));
+ entry_guard_free(e));
} else {
smartlist_add_all(entry_guards, old_entry_guards_not_on_list);
}
@@ -2641,11 +2641,13 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg)
});
if (*msg || !set) {
- SMARTLIST_FOREACH(new_entry_guards, entry_guard_t *, e, tor_free(e));
+ SMARTLIST_FOREACH(new_entry_guards, entry_guard_t *, e,
+ entry_guard_free(e));
smartlist_free(new_entry_guards);
} else { /* !*err && set */
if (entry_guards) {
- SMARTLIST_FOREACH(entry_guards, entry_guard_t *, e, tor_free(e));
+ SMARTLIST_FOREACH(entry_guards, entry_guard_t *, e,
+ entry_guard_free(e));
smartlist_free(entry_guards);
}
entry_guards = new_entry_guards;