aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2025-01-16 22:57:43 +1030
committerAlan Modra <amodra@gmail.com>2025-01-20 07:13:46 +1030
commitf7b0dfe03050f86062b8400f22c2a3e01eb0208c (patch)
treecd19585f6946160bf44f34e0064197f1ae1145d5
parent8c7653ab099c37250c0ffbf6b0925e8b6248a451 (diff)
downloadbinutils-f7b0dfe03050f86062b8400f22c2a3e01eb0208c.zip
binutils-f7b0dfe03050f86062b8400f22c2a3e01eb0208c.tar.gz
binutils-f7b0dfe03050f86062b8400f22c2a3e01eb0208c.tar.bz2
Use stat_alloc in plugin
We never free the tv array. * plugin.c (plugin_load_plugins): Use stat_alloc.
-rw-r--r--ld/plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index 4a21d13..1e7fde3 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -1120,7 +1120,7 @@ plugin_load_plugins (void)
}
/* Allocate tv array and initialise constant part. */
- my_tv = xmalloc ((max_args + 1 + tv_header_size) * sizeof *my_tv);
+ my_tv = stat_alloc ((max_args + 1 + tv_header_size) * sizeof (*my_tv));
set_tv_header (my_tv);
/* Pass over plugins again, activating them. */