This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/25757] New: Small memory leak in 'prefix_from_string' of file 'collect2.c'
- From: "christophe dot jaillet at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jan 2006 21:52:56 -0000
- Subject: [Bug other/25757] New: Small memory leak in 'prefix_from_string' of file 'collect2.c'
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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