mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Avoid mmap leak if we get a consensus diff we can't use.
Fixes CID 1440819; bug not in any released Tor.
This commit is contained in:
parent
3e2423d19b
commit
18a4eaf5c1
@ -2221,6 +2221,7 @@ handle_response_fetch_consensus(dir_connection_t *conn,
|
|||||||
if (!consensus_body) {
|
if (!consensus_body) {
|
||||||
log_warn(LD_DIR, "Received a consensus diff, but we can't find "
|
log_warn(LD_DIR, "Received a consensus diff, but we can't find "
|
||||||
"any %s-flavored consensus in our current cache.",flavname);
|
"any %s-flavored consensus in our current cache.",flavname);
|
||||||
|
tor_munmap_file(mapped_consensus);
|
||||||
networkstatus_consensus_download_failed(0, flavname);
|
networkstatus_consensus_download_failed(0, flavname);
|
||||||
// XXXX if this happens too much, see below
|
// XXXX if this happens too much, see below
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user