diff options
author | Roger Dingledine <arma@torproject.org> | 2010-08-13 17:30:50 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-08-13 17:30:50 -0400 |
commit | b1a588855380d021b536f42b70c9815b83eca430 (patch) | |
tree | f79a68950af25ef14d6807a5935e87fdef298710 | |
parent | a1686d867e0a35417e1e65ad0730bcd116edd10f (diff) | |
download | tor-b1a588855380d021b536f42b70c9815b83eca430.tar.gz tor-b1a588855380d021b536f42b70c9815b83eca430.zip |
fix a memory leak introduced by df1ef2f0f0856af
-rw-r--r-- | changes/leak-weight-params | 3 | ||||
-rw-r--r-- | src/or/networkstatus.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/changes/leak-weight-params b/changes/leak-weight-params new file mode 100644 index 0000000000..f4a8df5d6d --- /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 a9a9c78b89..54b77992cd 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); |