From 15131809c235047c94387ef9aff207117191ed0b Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Thu, 25 Mar 2021 16:32:46 +0000 Subject: [PATCH] libctf: fix memory leak in a test Harmless, but causes noise that makes it harder to spot other leaks. libctf/ChangeLog 2021-03-25 Nick Alcock * testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Don't leak buf. --- libctf/ChangeLog | 5 +++++ .../libctf-writable/symtypetab-nonlinker-writeout.c | 1 + 2 files changed, 6 insertions(+) diff --git a/libctf/ChangeLog b/libctf/ChangeLog index c5d52f29d69..d4a94bb27ce 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,8 @@ +2021-03-25 Nick Alcock + + * testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Don't + leak buf. + 2021-03-25 Nick Alcock PR libctf/27628 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.30.2