]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR 32391 memory leak
authorAlan Modra <amodra@gmail.com>
Wed, 1 Jan 2025 12:19:59 +0000 (22:49 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 1 Jan 2025 12:19:59 +0000 (22:49 +1030)
* macro.c (sub_actual): Free newadd.

gas/macro.c

index 9670b38c152bdeb210db72e09bcd9c03893fc289..9eefc8360b11fb1c87011f2d7aaab2edd6893729 100644 (file)
@@ -878,6 +878,7 @@ sub_actual (size_t start, sb *in, sb *t, struct htab *formal_hash,
              (void) macro_expand_body (add, &newadd, NULL, NULL,
                                        orig_macro, orig_macro->count);
              sb_add_sb (out, &newadd);
+             sb_kill (&newadd);
            }
          else
            {