tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 17a70ab7c53b31a51ce615f7ad280c7df32e8701
parent 12dc46c9cafcce7d27d245e005ff56ed55958310
Author: David Goulet <dgoulet@torproject.org>
Date:   Mon,  5 Aug 2024 15:26:38 -0400

Merge branch 'maint-0.4.8'

Diffstat:
Achanges/ticket40966 | 3+++
Msrc/feature/dirauth/dirvote.c | 4+++-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/ticket40966 b/changes/ticket40966 @@ -0,0 +1,3 @@ + o Minor bugfixes (memleak, authority): + - Fix a small memleak when computing a new consensus. This only affects + directory authorities. Fixes bug 40966; bugfix on 0.3.5.1-alpha. diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c @@ -3490,8 +3490,10 @@ dirvote_compute_consensuses(void) { char *filename; tor_asprintf(&filename, "my-consensus-%s", flavor_name); - write_str_to_file(get_datadir_fname(filename), consensus_body, 0); + char *fpath = get_datadir_fname(filename); + write_str_to_file(fpath, consensus_body, 0); tor_free(filename); + tor_free(fpath); } consensus_body = NULL;