Backport: Fix numerous memory leaks: some were almost impossible to trigger, and some almost inevitable.

svn:r16781
This commit is contained in:
Nick Mathewson
2008-09-05 20:54:52 +00:00
parent cbadc6efe3
commit 066104e853
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -696,6 +696,8 @@ clear_trackexithost_mappings(const char *exitname)
MAP_DEL_CURRENT(address);
}
} STRMAP_FOREACH_END;
tor_free(suffix);
}
/** Remove all entries from the addressmap that were set via the
+1 -1
View File
@@ -2806,7 +2806,7 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
* receive anything. */
write_http_status_line(conn, 400, "Nonauthoritative directory does not "
"accept posted server descriptors");
return 0;
goto done;
}
if (authdir_mode_handles_descs(options, -1) &&
+1
View File
@@ -884,6 +884,7 @@ rend_cache_store(const char *desc, size_t desc_len, int published)
if (!published && strmap_get_lc(rend_cache, key)) {
log_info(LD_REND, "We already have a v2 descriptor for service %s.",
safe_str(query));
rend_service_descriptor_free(parsed);
return -1;
}
/* report novel publication to statistics */