From 4ad296c60b1188e21e861e800a84eee32f986a9e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Feb 2009 12:14:41 +0000 Subject: - A second follow-up change by Andre Guibert de Bruet to fix a related memory leak like that fixed on the 14th. When zlib returns failure, we need to cleanup properly before returning error. --- lib/content_encoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/content_encoding.c') diff --git a/lib/content_encoding.c b/lib/content_encoding.c index d2ad3f49f..9163f0bab 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -136,7 +136,7 @@ inflate_stream(struct connectdata *conn, (void) inflateEnd(z); /* don't care about the return code */ if(inflateInit2(z, -MAX_WBITS) != Z_OK) { free(decomp); - return process_zlib_error(conn, z); + return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); } z->next_in = orig_in; z->avail_in = nread; -- cgit v1.2.1