[PATCH v3 11/33] libctf: fix memory leak on ctf_compress_write error path
Nick Alcock
nick.alcock@oracle.com
Fri Sep 6 22:56:00 GMT 2019
More information about the Binutils mailing list
Fri Sep 6 22:56:00 GMT 2019
- Previous message (by thread): Should strip discard the .ctf section ?
- Next message (by thread): [PATCH v3 11/33] libctf: fix memory leak on ctf_compress_write error path
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
We were failing to free the compressed-data buffer if compression
failed.
libctf/
* ctf-create.c (ctf_compress_write): Fix leak.
---
libctf/ctf-create.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c
index 6189042fdb0..76304f724c7 100644
--- a/libctf/ctf-create.c
+++ b/libctf/ctf-create.c
@@ -1997,7 +1997,6 @@ ctf_compress_write (ctf_file_t *fp, int fd)
{
ctf_dprintf ("zlib deflate err: %s\n", zError (rc));
err = ctf_set_errno (fp, ECTF_COMPRESS);
- ctf_free (buf);
goto ret;
}
--
2.23.0.239.g28aa4420fd
- Previous message (by thread): Should strip discard the .ctf section ?
- Next message (by thread): [PATCH v3 11/33] libctf: fix memory leak on ctf_compress_write error path
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list