]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix a memory leak introduced by df1ef2f0f0856af
authorRoger Dingledine <arma@torproject.org>
Fri, 13 Aug 2010 21:30:50 +0000 (17:30 -0400)
committerRoger Dingledine <arma@torproject.org>
Fri, 13 Aug 2010 21:30:50 +0000 (17:30 -0400)
changes/leak-weight-params [new file with mode: 0644]
src/or/networkstatus.c

diff --git a/changes/leak-weight-params b/changes/leak-weight-params
new file mode 100644 (file)
index 0000000..f4a8df5
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - Fix a memory leak every time we parse a v3 network consensus. Bugfix
+      on 0.2.2.10-alpha.
index a9a9c78b8963f2ebc5b7c043ccdbd9e73848dad5..54b77992cddc7565bba89616f98c600f73cc0819 100644 (file)
@@ -351,6 +351,10 @@ networkstatus_vote_free(networkstatus_t *ns)
     SMARTLIST_FOREACH(ns->known_flags, char *, c, tor_free(c));
     smartlist_free(ns->known_flags);
   }
+  if (ns->weight_params) {
+    SMARTLIST_FOREACH(ns->weight_params, char *, c, tor_free(c));
+    smartlist_free(ns->weight_params);
+  }
   if (ns->net_params) {
     SMARTLIST_FOREACH(ns->net_params, char *, c, tor_free(c));
     smartlist_free(ns->net_params);