1
0
Fork 0
forked from lthn/blockchain

error handling improved in zlib

This commit is contained in:
cryptozoidberg 2025-07-24 17:56:31 +04:00
parent d9557d3bb1
commit 8953e201d6
No known key found for this signature in database
GPG key ID: 2E10CC61CAC8F36D

View file

@ -98,6 +98,7 @@ namespace zlib_helper
if (ret != Z_OK)
{
LOCAL_ASSERT(0);
inflateEnd(&zstream);
return false;
}
@ -108,6 +109,7 @@ namespace zlib_helper
if (ret != Z_OK && ret != Z_STREAM_END)
{
LOCAL_ASSERT(0);
inflateEnd(&zstream);
return false;
}
@ -118,6 +120,7 @@ namespace zlib_helper
if(ungzip_buff_size == zstream.avail_out)
{
LOG_ERROR("Can't unpack buffer");
inflateEnd(&zstream);
return false;
}