aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-25 14:31:15 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-25 14:31:15 +0000
commit73c1cfe80b85d31aeac1d596c17292f102363785 (patch)
treeccd2544359b2d30197fbd0ea6f0177581545c4eb
parent53e62339857eaa650df769ad3ad7cc2527b296ca (diff)
downloadtor-73c1cfe80b85d31aeac1d596c17292f102363785.tar.gz
tor-73c1cfe80b85d31aeac1d596c17292f102363785.zip
r16154@catbus: nickm | 2007-10-25 10:29:47 -0400
Fix more memory leaks, with help from dmalloc. svn:r12188
-rw-r--r--ChangeLog12
-rw-r--r--src/or/dirserv.c1
-rw-r--r--src/or/networkstatus.c3
-rw-r--r--src/or/routerparse.c1
4 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5de8e7de31..cd6715604e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,10 +2,20 @@ Changes in version 0.2.0.10-alpha - 2007-1?-??
o Minor bugfixes:
- Refuse to start if both ORPort and UseBridges are set. Bugfix
on 0.2.0.x.
+
+ o Minor bugfixes (memory leaks):
- Stop leaking memory every time we parse a v3 certificate. Bugfix
on 0.2.0.1-alpha.
- Stop leaking memory every time we load a v3 certificate. Bugfix
- on 0.2.0.1-alpha. Fixes Bug 536.
+ on 0.2.0.1-alpha. Fixes Bug 536
+ - Stop leaking a cached networkstatus on exit. Bugfix on
+ 0.2.0.3-alpha.
+ - Stop leaking voter information every time we free a consensus. Bugfix
+ on 0.2.0.3-alpha.
+ - Stop leaking signed data every time we check a voter signature.
+ Bugfix on 0.2.0.3-alpha.
+ - Stop leaking a signature every time we fail to parse a consensus or
+ a vote. Bugfix on 0.2.0.3-alpha.
Changes in version 0.2.0.9-alpha - 2007-10-24
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index e9d552e8ac..b651ce3507 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2813,5 +2813,6 @@ dirserv_free_all(void)
digestmap_free(cached_v2_networkstatus, _free_cached_dir);
cached_v2_networkstatus = NULL;
}
+ cached_dir_decref(cached_v3_networkstatus);
}
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 0a4006abe8..b8500d448e 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -231,6 +231,8 @@ networkstatus_vote_free(networkstatus_vote_t *ns)
tor_free(voter->nickname);
tor_free(voter->address);
tor_free(voter->contact);
+ tor_free(voter->signature);
+ tor_free(voter);
});
smartlist_free(ns->voters);
}
@@ -302,6 +304,7 @@ networkstatus_check_voter_signature(networkstatus_vote_t *consensus,
} else {
voter->good_signature = 1;
}
+ tor_free(signed_digest);
return 0;
}
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 02f666bc41..10d0436507 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2241,6 +2241,7 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
tor_free(voter->nickname);
tor_free(voter->address);
tor_free(voter->contact);
+ tor_free(voter->signature);
tor_free(voter);
}
if (rs_tokens) {