Skip to content

Commit 3fb37e4

Browse files
fcambusamodra
authored andcommitted
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. (cherry picked from commit e37709f)
1 parent 0db21b8 commit 3fb37e4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

binutils/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2021-01-26 Frederic Cambus <fred@statdns.com>
2+
3+
* objcopy.c (copy_main): Fix a double free happening when both
4+
--localize-symbols and --globalize-symbols options are invoked
5+
together.
6+
17
2021-01-24 Nick Clifton <nickc@redhat.com>
28

39
* configure: Regenerate.

binutils/objcopy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6018,7 +6018,7 @@ copy_main (int argc, char *argv[])
60186018
free (keep_specific_buffer);
60196019

60206020
if (localize_specific_buffer)
6021-
free (globalize_specific_buffer);
6021+
free (localize_specific_buffer);
60226022

60236023
if (globalize_specific_buffer)
60246024
free (globalize_specific_buffer);

0 commit comments

Comments
 (0)