Like the PR15356 fix for the same leak in bfd, but for readelf.c
PR 26539
* readelf.c (uncompress_section_contents): Always call inflateEnd.
+2021-01-15 Alan Modra <amodra@gmail.com>
+
+ PR 26539
+ * readelf.c (uncompress_section_contents): Always call inflateEnd.
+
2021-01-14 Alexandre Oliva <oliva@gnu.org>
* MAINTAINERS: Update my email address.
while (strm.avail_in > 0)
{
if (rc != Z_OK)
- goto fail;
+ break;
strm.next_out = ((Bytef *) uncompressed_buffer
+ (uncompressed_size - strm.avail_out));
rc = inflate (&strm, Z_FINISH);
if (rc != Z_STREAM_END)
- goto fail;
+ break;
rc = inflateReset (& strm);
}
- rc = inflateEnd (& strm);
+ rc |= inflateEnd (& strm);
if (rc != Z_OK
|| strm.avail_out != 0)
goto fail;