From: Roger Dingledine Date: Thu, 29 Mar 2007 07:02:12 +0000 (+0000) Subject: fix a memory leak when we ask for "all" networkstatuses and X-Git-Tag: tor-0.2.0.1-alpha~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f36c613dbc5f9326eea1626eaee63aa64e96f58e;p=thirdparty%2Ftor.git fix a memory leak when we ask for "all" networkstatuses and we get one we don't recognize. backport candidate. backbackport candidate. svn:r9918 --- 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.",