From a33452c40149842fda3ce2a201a722009e7e1456 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 13 Jan 2009 14:43:51 +0000 Subject: 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 --- src/common/torgzip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 180c1e6df..f75ef8350 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; -- cgit v1.2.3