]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
mmix disassemble memory leak
authorAlan Modra <amodra@gmail.com>
Thu, 18 Apr 2024 23:34:16 +0000 (09:04 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 19 Apr 2024 00:30:57 +0000 (10:00 +0930)
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.

opcodes/mmix-dis.c

index ea17bfe974a406549504ff9821019e41c187aeb2..370da70ed5db2cdd4cdc4cf3d8fb3b025a04d4f8 100644 (file)
@@ -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);
        }
     }