This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: Fix memory leak in chew
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Mon, 22 Aug 2016 14:23:08 +0100
- Subject: Commit: Fix memory leak in chew
- Authentication-results: sourceware.org; auth=none
Hi Guys,
I am applying the patch below to close a memory leak in the chew
program. Doing so allows me to compile the binutils with
-fsanitize=address enabled.
Cheers
Nick
bfd/ChangeLog
2016-08-22 Nick Clifton <nickc@redhat.com>
* doc/chew.c (main): Free the string buffer used to files as they
are parsed.
diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c
index 71c7e2d..bf3d249 100644
--- a/bfd/doc/chew.c
+++ b/bfd/doc/chew.c
@@ -1602,6 +1602,7 @@ main (ac, av)
read_in (&b, f);
compile (b.ptr);
perform ();
+ delete_string (&b);
}
else if (av[i][1] == 'i')
{