mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
ld plugin.c concat leaks
* ldlang.c: Whitespace. (stat_free, stat_concat): New functions. * ldlang.h (stat_free, stat_concat): Declare. * plugin.c (asymbol_from_plugin_symbol): Use stat_concat.
This commit is contained in:
@@ -366,7 +366,8 @@ asymbol_from_plugin_symbol (bfd *abfd, asymbol *asym,
|
||||
|
||||
asym->the_bfd = abfd;
|
||||
asym->name = (ldsym->version
|
||||
? concat (ldsym->name, "@", ldsym->version, (const char *) NULL)
|
||||
? stat_concat (ldsym->name, "@", ldsym->version,
|
||||
(const char *) NULL)
|
||||
: ldsym->name);
|
||||
asym->value = 0;
|
||||
switch (ldsym->def)
|
||||
@@ -378,11 +379,11 @@ asymbol_from_plugin_symbol (bfd *abfd, asymbol *asym,
|
||||
flags |= BSF_GLOBAL;
|
||||
if (ldsym->comdat_key)
|
||||
{
|
||||
char *name = concat (".gnu.linkonce.t.", ldsym->comdat_key,
|
||||
(const char *) NULL);
|
||||
char *name = stat_concat (".gnu.linkonce.t.", ldsym->comdat_key,
|
||||
(const char *) NULL);
|
||||
section = bfd_get_section_by_name (abfd, name);
|
||||
if (section != NULL)
|
||||
free (name);
|
||||
stat_free (name);
|
||||
else
|
||||
{
|
||||
flagword sflags;
|
||||
|
||||
Reference in New Issue
Block a user