[binutils-gdb] Fix thinko in objcopy's memory freeing code.
Nick Clifton
nickc@sourceware.org
Tue Jan 26 09:56:26 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e37709f0901fe6f2410094151002bab3d123df85
commit e37709f0901fe6f2410094151002bab3d123df85
Author: Frederic Cambus <fred@statdns.com>
Date: Tue Jan 26 09:55:34 2021 +0000
Fix thinko in objcopy's memory freeing code.
* objcopy.c (copy_main): Fix a double free happening when both
--localize-symbols and --globalize-symbols options are invoked
together.
Diff:
---
binutils/ChangeLog | 6 ++++++
binutils/objcopy.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b0a8da7a2df..fd9f4bda8c2 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-26 Frederic Cambus <fred@statdns.com>
+
+ * objcopy.c (copy_main): Fix a double free happening when both
+ --localize-symbols and --globalize-symbols options are invoked
+ together.
+
2021-01-24 Nick Clifton <nickc@redhat.com>
* README-how-to-make-a-release: Minor updates after the 2.36 release.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 62ee22202ff..a5cead1cf8e 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -6018,7 +6018,7 @@ copy_main (int argc, char *argv[])
free (keep_specific_buffer);
if (localize_specific_buffer)
- free (globalize_specific_buffer);
+ free (localize_specific_buffer);
if (globalize_specific_buffer)
free (globalize_specific_buffer);
More information about the Binutils-cvs
mailing list