diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-02 13:30:55 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-02 13:30:55 -0400 |
commit | 18a4eaf5c142bae55780716464d43c2f8a9e2e49 (patch) | |
tree | e704fb44bf4c3d61812214a64746fe859dd8e72b /src/feature/dirclient | |
parent | 3e2423d19b78ab71cb1ac8205406c7575296ecd3 (diff) | |
download | tor-18a4eaf5c142bae55780716464d43c2f8a9e2e49.tar.gz tor-18a4eaf5c142bae55780716464d43c2f8a9e2e49.zip |
Avoid mmap leak if we get a consensus diff we can't use.
Fixes CID 1440819; bug not in any released Tor.
Diffstat (limited to 'src/feature/dirclient')
-rw-r--r-- | src/feature/dirclient/dirclient.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/feature/dirclient/dirclient.c b/src/feature/dirclient/dirclient.c index 705bf75e5c..cd88fa5ebf 100644 --- a/src/feature/dirclient/dirclient.c +++ b/src/feature/dirclient/dirclient.c @@ -2221,6 +2221,7 @@ handle_response_fetch_consensus(dir_connection_t *conn, if (!consensus_body) { log_warn(LD_DIR, "Received a consensus diff, but we can't find " "any %s-flavored consensus in our current cache.",flavname); + tor_munmap_file(mapped_consensus); networkstatus_consensus_download_failed(0, flavname); // XXXX if this happens too much, see below return -1; |