mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
Fix a use-after-freed error introduced by previous attempt to fix a Coverity scan result.
PR 23633 * objcopy.c (add_specific_symbols): Do not free the buffer at the end of the function.
This commit is contained in:
parent
5be12fc1ad
commit
508d0c9b59
@ -1,3 +1,9 @@
|
||||
2018-09-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 23633
|
||||
* objcopy.c (add_specific_symbols): Do not free the buffer at the
|
||||
end of the function.
|
||||
|
||||
2018-09-10 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR binutils/23611
|
||||
|
@ -1143,7 +1143,8 @@ add_specific_symbols (const char *filename, htab_t htab)
|
||||
line_count ++;
|
||||
}
|
||||
|
||||
free (buffer);
|
||||
/* Do not free the buffer. Parts of it will have been referenced
|
||||
in the calls to add_specific_symbol. */
|
||||
}
|
||||
|
||||
/* See whether a symbol should be stripped or kept
|
||||
|
Loading…
Reference in New Issue
Block a user