In function 'prefix_from_string' of file 'collect2.c', a variable 'nstore' is
xmalloc'ed.

This variable is passed to 'add_prefix' where it is xstrdup'ed.

But the variable nstore itself seems to never be free'ed.
So, I think that a 'free(nstore)' should be added at the end of the function.

CJ


-- 
           Summary: Small memory leak in 'prefix_from_string' of file
                    'collect2.c'
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: christophe dot jaillet at wanadoo dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25757

Reply via email to