summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-08 21:43:02 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-16 07:48:17 -0500
commit6e12a8f04714aa56308b06c691066cc3d4b0090b (patch)
tree0088a3467f46c277726af100628ad1cb9859b948 /src
parentfe8156dbc20870bb2e065aa10ca7f2e993958597 (diff)
downloadtor-6e12a8f04714aa56308b06c691066cc3d4b0090b.tar.gz
tor-6e12a8f04714aa56308b06c691066cc3d4b0090b.zip
Use dir_conn_clear_spool() in connection.c.
This is cleaner than iterating over the spool.
Diffstat (limited to 'src')
-rw-r--r--src/core/mainloop/connection.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index 09b75c4e5a..f0ebce9bbb 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -719,11 +719,7 @@ connection_free_minimal(connection_t *conn)
tor_free(dir_conn->requested_resource);
tor_compress_free(dir_conn->compress_state);
- if (dir_conn->spool) {
- SMARTLIST_FOREACH(dir_conn->spool, spooled_resource_t *, spooled,
- spooled_resource_free(spooled));
- smartlist_free(dir_conn->spool);
- }
+ dir_conn_clear_spool(dir_conn);
rend_data_free(dir_conn->rend_data);
hs_ident_dir_conn_free(dir_conn->hs_ident);