]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/config/tc-i386.c
x86: Fix a memory leak in md_assemble
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 9 Apr 2024 23:01:16 +0000 (16:01 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 16 Apr 2024 13:32:33 +0000 (06:32 -0700)
commit2d4c39a885d4d12325d0a9be9e014e75a295fb25
treeae41dbc1643deaf76ccadec0327b1474d5b8c1ad
parentaa38e605634e5ce8357d610655d6eb72c3e7d2d2
x86: Fix a memory leak in md_assemble

Fix a memory leak in md_assemble where copy may be cleared and may be
the same as copy:

      if (copy && !mnem_suffix)
        {
          line = copy;
          copy = NULL;
  no_match:

* config/tc-i386.c (md_assemble): Properly free the xstrdup
memory.
gas/config/tc-i386.c