summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-15 18:13:38 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-15 18:13:38 -0400
commitd3279d4304f5ebae0d1612e6c16d20e27b8e8790 (patch)
tree257f2a7902d22d783e660a564350caaff30bba34 /src/or
parent460b9230263f0af40c08d8e97f5f13aa69127bf6 (diff)
downloadtor-d3279d4304f5ebae0d1612e6c16d20e27b8e8790.tar.gz
tor-d3279d4304f5ebae0d1612e6c16d20e27b8e8790.zip
Do not try to uncompress an empty spool
Diffstat (limited to 'src/or')
-rw-r--r--src/or/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index aca3030ea1..15f7491fc6 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -4081,7 +4081,7 @@ handle_get_current_consensus(dir_connection_t *conn,
vary_header,
smartlist_len(conn->spool) == 1 ? lifetime : 0);
- if (compress_method == NO_METHOD)
+ if (compress_method == NO_METHOD && smartlist_len(conn->spool))
conn->compress_state = tor_compress_new(0, compression_used,
HIGH_COMPRESSION);