mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Fix a memory leak in circuit_build_times_parse_state
Thanks weasel for noticing.
This commit is contained in:
parent
8d588e7b1a
commit
70f0ba1495
3
changes/bug1831
Normal file
3
changes/bug1831
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes
|
||||
- Fix a memory leak in the error case of circuit_build_times_parse_state().
|
||||
Bugfix on 0.2.2.14-alpha; fixes bug 1831 partially.
|
@ -692,7 +692,8 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt,
|
||||
"Corrupt state file? Build times count mismatch. "
|
||||
"Read %d times, but file says %d", loaded_cnt,
|
||||
state->TotalBuildTimes);
|
||||
*msg = tor_strdup("Build times count mismatch.");
|
||||
if (!*msg)
|
||||
*msg = tor_strdup("Build times count mismatch.");
|
||||
circuit_build_times_reset(cbt);
|
||||
tor_free(loaded_times);
|
||||
return -1;
|
||||
@ -716,7 +717,8 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt,
|
||||
"Corrupt state file? Shuffled build times mismatch. "
|
||||
"Read %d times, but file says %d", tot_values,
|
||||
state->TotalBuildTimes);
|
||||
*msg = tor_strdup("Build times count mismatch.");
|
||||
if (!*msg)
|
||||
*msg = tor_strdup("Build times count mismatch.");
|
||||
circuit_build_times_reset(cbt);
|
||||
tor_free(loaded_times);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user