https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120566

            Bug ID: 120566
           Summary: Possible memory leak in set_multilib_dir at gcc.cc
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shuhaofu.g at gmail dot com
  Target Milestone: ---

Affected commit: 34701fe95d3f3b4e9f8056ce32e7f699f8441e7f at Github Mirror

Within the function `set_multilib_dir`, if this branch condition
(https://github.com/gcc-mirror/gcc/blob/34701fe95d3f3b4e9f8056ce32e7f699f8441e7f/gcc/gcc.cc#L9973)
evaluates to true, ptr `p` gets pointed to a heap memory address with the
function `concat`.

For the rest of the function `set_multilib_dir`, this heap memory has not been
freed properly.

Reply via email to