aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-03-29 07:02:12 +0000
committerRoger Dingledine <arma@torproject.org>2007-03-29 07:02:12 +0000
commitf36c613dbc5f9326eea1626eaee63aa64e96f58e (patch)
treef08912392efa193e28e5ee24d7e6b591bef7ca54 /src/or/routerlist.c
parent6a61f74689ecbd43309c819899ae705d21bdb86b (diff)
downloadtor-f36c613dbc5f9326eea1626eaee63aa64e96f58e.tar.gz
tor-f36c613dbc5f9326eea1626eaee63aa64e96f58e.zip
fix a memory leak when we ask for "all" networkstatuses and
we get one we don't recognize. backport candidate. backbackport candidate. svn:r9918
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index c5a1dfddeb..073d0424c2 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2517,9 +2517,9 @@ router_set_networkstatus(const char *s, time_t arrived_at,
if (smartlist_string_isin(requested_fingerprints, fp)) {
smartlist_string_remove(requested_fingerprints, fp);
} else {
- char *requested =
- smartlist_join_strings(requested_fingerprints," ",0,NULL);
if (source != NS_FROM_DIR_ALL) {
+ char *requested =
+ smartlist_join_strings(requested_fingerprints," ",0,NULL);
log_warn(LD_DIR,
"We received a network status with a fingerprint (%s) that we "
"never requested. (We asked for: %s.) Dropping.",