diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compress.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/compress.c b/src/common/compress.c index 6513029f9c..92b64d1e91 100644 --- a/src/common/compress.c +++ b/src/common/compress.c @@ -128,6 +128,11 @@ tor_compress_impl(int compress, // inputs. tor_compress_free(stream); stream = tor_compress_new(compress, method, compression_level); + if (stream == NULL) { + log_warn(LD_GENERAL, "NULL stream while %scompressing", + compress?"":"de"); + goto err; + } } break; case TOR_COMPRESS_OK: |