diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-01-13 14:43:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-01-13 14:43:51 +0000 |
commit | a33452c40149842fda3ce2a201a722009e7e1456 (patch) | |
tree | 5bc3efc1704b0fb1dafface01fbda1e6a8da6e3b /src/common/torgzip.c | |
parent | c32a4ce6b3ac5d24ff53639d2c00d9864e9bf22c (diff) | |
download | tor-a33452c40149842fda3ce2a201a722009e7e1456.tar.gz tor-a33452c40149842fda3ce2a201a722009e7e1456.zip |
Fix up (I hope) most ot the things that coverity suddenly claimed were REVERSE_INULL. This is what we get for bragging about being down to 0 issues.
svn:r18096
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r-- | src/common/torgzip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 180c1e6dfd..f75ef83503 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -76,14 +76,14 @@ tor_gzip_compress(char **out, size_t *out_len, tor_assert(in); tor_assert(in_len < UINT_MAX); + *out = NULL; + if (method == GZIP_METHOD && !is_gzip_supported()) { /* Old zlib version don't support gzip in deflateInit2 */ log_warn(LD_BUG, "Gzip not supported with zlib %s", ZLIB_VERSION); - return -1; + goto err; } - *out = NULL; - stream = tor_malloc_zero(sizeof(struct z_stream_s)); stream->zalloc = Z_NULL; stream->zfree = Z_NULL; |