From: Alan Modra Date: Thu, 18 Apr 2024 23:34:16 +0000 (+0930) Subject: mmix disassemble memory leak X-Git-Tag: gdb-15-branchpoint~349 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1defbe4267c73b318f0e0aad82691ef3647cc1f;p=thirdparty%2Fbinutils-gdb.git mmix disassemble memory leak It's a once-off and of no consequence, but fix it anyway. The mmix caonoicalize_syms array is an array of pointers. Freeing it won't lose symbol names. * mmix-dis.c (initialize_mmix_dis_info): Free syms. --- diff --git a/opcodes/mmix-dis.c b/opcodes/mmix-dis.c index ea17bfe974a..370da70ed5d 100644 --- a/opcodes/mmix-dis.c +++ b/opcodes/mmix-dis.c @@ -117,6 +117,7 @@ initialize_mmix_dis_info (struct disassemble_info *info) && minfop->reg_name[syms[i]->value] == NULL) minfop->reg_name[syms[i]->value] = syms[i]->name; } + free (syms); } }