mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-23 20:03:31 +01:00
dirvote: Fix memleak when computing consensus
Fixes #40966 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
d587ba01a7
commit
93df26b11a
3
changes/ticket40966
Normal file
3
changes/ticket40966
Normal file
@ -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.
|
@ -3543,8 +3543,10 @@ dirvote_compute_consensuses(void)
|
|||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
tor_asprintf(&filename, "my-consensus-%s", flavor_name);
|
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(filename);
|
||||||
|
tor_free(fpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
consensus_body = NULL;
|
consensus_body = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user