This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/25757] New: Small memory leak in 'prefix_from_string' of file 'collect2.c'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]