[binutils-gdb] gas ppc .machine leak

Alan Modra amodra@sourceware.org
Thu Jan 16 09:31:15 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b413284b8fb5dc986b3998d68a41a6675205dae1

commit b413284b8fb5dc986b3998d68a41a6675205dae1
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Jan 14 21:08:09 2025 +1030

    gas ppc .machine leak
    
            * config/tc-ppc.c (ppc_machine): Free cpu_string.

Diff:
---
 gas/config/tc-ppc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index f9614035748..4e0bf24f365 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -5939,6 +5939,7 @@ ppc_machine (int ignore ATTRIBUTE_UNUSED)
       if (ppc_cpu != old_cpu)
 	ppc_setup_opcodes ();
     }
+  free (cpu_string);
 
   demand_empty_rest_of_line ();
 }


More information about the Binutils-cvs mailing list