[PATCH 6/8] libctf: fix memory leak in a test

Nick Alcock nick.alcock@oracle.com
Wed Mar 24 01:21:56 GMT 2021


Harmless, but causes noise that makes it harder to spot other leaks.

libctf/ChangeLog
2021-03-23  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Don't
	leak buf.
---
 libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c b/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
index 98144de6391..bdc3faa944c 100644
--- a/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
+++ b/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
@@ -202,6 +202,7 @@ try_maybe_reporting (int report)
     }
 
   ctf_file_close (fp);
+  free (buf);
 
   return;
 
-- 
2.31.0.253.gdec51257f3



More information about the Binutils mailing list