mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
Fix a memory leak found while fuzzing
This commit is contained in:
parent
09d01466b2
commit
a092bcdd4f
@ -3711,11 +3711,10 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
|
|||||||
if (ns->type != NS_TYPE_CONSENSUS) {
|
if (ns->type != NS_TYPE_CONSENSUS) {
|
||||||
vote_routerstatus_t *rs = tor_malloc_zero(sizeof(vote_routerstatus_t));
|
vote_routerstatus_t *rs = tor_malloc_zero(sizeof(vote_routerstatus_t));
|
||||||
if (routerstatus_parse_entry_from_string(rs_area, &s, rs_tokens, ns,
|
if (routerstatus_parse_entry_from_string(rs_area, &s, rs_tokens, ns,
|
||||||
rs, 0, 0))
|
rs, 0, 0)) {
|
||||||
smartlist_add(ns->routerstatus_list, rs);
|
smartlist_add(ns->routerstatus_list, rs);
|
||||||
else {
|
} else {
|
||||||
tor_free(rs->version);
|
vote_routerstatus_free(rs);
|
||||||
tor_free(rs);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
routerstatus_t *rs;
|
routerstatus_t *rs;
|
||||||
|
Loading…
Reference in New Issue
Block a user