[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r9918: fix a memory leak when we ask for "all" networkstatuses and (tor/trunk/src/or)



Author: arma
Date: 2007-03-29 03:02:12 -0400 (Thu, 29 Mar 2007)
New Revision: 9918

Modified:
   tor/trunk/src/or/routerlist.c
Log:
fix a memory leak when we ask for "all" networkstatuses and
we get one we don't recognize.
backport candidate.
backbackport candidate.


Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-03-29 02:55:00 UTC (rev 9917)
+++ tor/trunk/src/or/routerlist.c	2007-03-29 07:02:12 UTC (rev 9918)
@@ -2517,9 +2517,9 @@
     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.",