From: Alan Modra Date: Thu, 16 Jan 2025 12:27:43 +0000 (+1030) Subject: Use stat_alloc in plugin X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7b0dfe03050f86062b8400f22c2a3e01eb0208c;p=thirdparty%2Fbinutils-gdb.git Use stat_alloc in plugin We never free the tv array. * plugin.c (plugin_load_plugins): Use stat_alloc. --- diff --git a/ld/plugin.c b/ld/plugin.c index 4a21d130742..1e7fde3183a 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. */