summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-02-01 09:01:44 -0500
committerNick Mathewson <nickm@torproject.org>2017-02-01 09:01:44 -0500
commit2e93bffa1dbd4e38038a040b1159ade093cdf41c (patch)
tree468ce197920a52129e7d4f7ff088383d1a3a0491
parentf8885b76ef353c4bccc90119448df5301b3ba8cb (diff)
parent0f0d4356b21df48f1832c3de606eb70e16e94566 (diff)
downloadtor-2e93bffa1dbd4e38038a040b1159ade093cdf41c.tar.gz
tor-2e93bffa1dbd4e38038a040b1159ade093cdf41c.zip
Merge remote-tracking branch 'public/bug21129'
-rw-r--r--changes/bug211294
-rw-r--r--src/or/entrynodes.c13
2 files changed, 5 insertions, 12 deletions
diff --git a/changes/bug21129 b/changes/bug21129
new file mode 100644
index 0000000000..5a09bb489d
--- /dev/null
+++ b/changes/bug21129
@@ -0,0 +1,4 @@
+ o Minor bugfixes (client, entry guards):
+ - Fix a spurious bug warning (with backtrace) when removing an
+ expired entry guard. Fixes bug 21129; bugfix on 0.3.0.1-alpha.
+
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index f9b3b60a6f..e8db4a4dbb 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -1112,18 +1112,7 @@ remove_guard_from_confirmed_and_primary_lists(guard_selection_t *gs,
}
if (guard->confirmed_idx >= 0) {
- entry_guard_t *found_guard = NULL;
- if (guard->confirmed_idx < smartlist_len(gs->confirmed_entry_guards))
- found_guard = smartlist_get(gs->confirmed_entry_guards,
- guard->confirmed_idx);
- if (BUG(guard != found_guard)) {
- // LCOV_EXCL_START
- smartlist_remove_keeporder(gs->confirmed_entry_guards, guard);
- // LCOV_EXCL_STOP
- } else {
- smartlist_del_keeporder(gs->confirmed_entry_guards,
- guard->confirmed_idx);
- }
+ smartlist_remove_keeporder(gs->confirmed_entry_guards, guard);
guard->confirmed_idx = -1;
guard->confirmed_on_date = 0;
} else {