]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check for duplicate-close in connection_dir_finished_flusing()
authorNick Mathewson <nickm@torproject.org>
Tue, 21 Aug 2018 13:50:48 +0000 (09:50 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 21 Aug 2018 13:50:48 +0000 (09:50 -0400)
Fix for 26896.

changes/bug26896 [new file with mode: 0644]
src/or/directory.c

diff --git a/changes/bug26896 b/changes/bug26896
new file mode 100644 (file)
index 0000000..9762dc7
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (directory connection shutdown):
+    - Avoid a double-close when shutting down a stalled directory connection.
+      Fixes bug 26896; bugfix on 0.3.4.1-alpha.
index e763de268f2e53b7f5d55e3bd989f7b2d664bdd3..32ec876f789d8fcbe162d352c38a0dea4b5fabf8 100644 (file)
@@ -5179,6 +5179,9 @@ connection_dir_finished_flushing(dir_connection_t *conn)
   tor_assert(conn);
   tor_assert(conn->base_.type == CONN_TYPE_DIR);
 
+  if (conn->marked_for_close)
+    return 0;
+
   /* Note that we have finished writing the directory response. For direct
    * connections this means we're done; for tunneled connections it's only
    * an intermediate step. */
@@ -5912,4 +5915,3 @@ dir_split_resource_into_spoolable(const char *resource,
   smartlist_free(fingerprints);
   return r;
 }
-