aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2024-08-05 15:26:38 -0400
committerDavid Goulet <dgoulet@torproject.org>2024-08-05 15:26:38 -0400
commit1b1b2b1a4a60cf32bcfa643eee28b88b9981ecf8 (patch)
treefea59ca97775f1f0c9fb19f7f4fb5bc467ac175f
parentf32b39236da40571955702bf95ac9925833af18f (diff)
parent93df26b11a67423e05c200cd93cba6398b9f2a49 (diff)
downloadtor-1b1b2b1a4a60cf32bcfa643eee28b88b9981ecf8.tar.gz
tor-1b1b2b1a4a60cf32bcfa643eee28b88b9981ecf8.zip
Merge branch 'maint-0.4.8' into release-0.4.8
-rw-r--r--changes/ticket409663
-rw-r--r--src/feature/dirauth/dirvote.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/ticket40966 b/changes/ticket40966
new file mode 100644
index 0000000000..04fb3caded
--- /dev/null
+++ 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
index 1080415827..0783fb1e91 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -3543,8 +3543,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;