mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
libctf: fix double-free on ctf_compress_write error path
We were freeing the compressed data buffer twice if compression failed. v4: Fix commit message. v5: fix tabdamage. libctf/ * ctf-create.c (ctf_compress_write): Fix double-free.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2019-07-13 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
|
* ctf-create.c (ctf_compress_write): Fix double-free.
|
||||||
|
|
||||||
2019-07-13 Nick Alcock <nick.alcock@oracle.com>
|
2019-07-13 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
* ctf-archive.c (ctf_arc_write): Split off, and reimplement in terms
|
* ctf-archive.c (ctf_arc_write): Split off, and reimplement in terms
|
||||||
|
@ -1997,7 +1997,6 @@ ctf_compress_write (ctf_file_t *fp, int fd)
|
|||||||
{
|
{
|
||||||
ctf_dprintf ("zlib deflate err: %s\n", zError (rc));
|
ctf_dprintf ("zlib deflate err: %s\n", zError (rc));
|
||||||
err = ctf_set_errno (fp, ECTF_COMPRESS);
|
err = ctf_set_errno (fp, ECTF_COMPRESS);
|
||||||
ctf_free (buf);
|
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user