[or-cvs] [tor/master] fix a memory leak introduced by df1ef2f0f0856af
arma at torproject.org
arma at torproject.org
Fri Aug 13 21:31:52 UTC 2010
Author: Roger Dingledine <arma at torproject.org>
Date: Fri, 13 Aug 2010 17:30:50 -0400
Subject: fix a memory leak introduced by df1ef2f0f0856af
Commit: b1a588855380d021b536f42b70c9815b83eca430
---
changes/leak-weight-params | 3 +++
src/or/networkstatus.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 changes/leak-weight-params
diff --git a/changes/leak-weight-params b/changes/leak-weight-params
new file mode 100644
index 0000000..f4a8df5
--- /dev/null
+++ b/changes/leak-weight-params
@@ -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.
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index a9a9c78..54b7799 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -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);
--
1.7.1
More information about the tor-commits
mailing list