This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/15893] New: Memory leak in stdlib/isomac.c.


http://sourceware.org/bugzilla/show_bug.cgi?id=15893

            Bug ID: 15893
           Summary: Memory leak in stdlib/isomac.c.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: brooks at gcc dot gnu.org
                CC: drepper.fsp at gmail dot com

As per OndÅej BÃlka's cppcheck results
(http://sourceware.org/ml/libc-alpha/2013-08/msg00448.html), there is a memory
leak in stdlib/isomac.c on line 266.  This code is the error-exit if the system
call fails:

  if (system (command))
    {
      puts ("system() returned nonzero");
      return NULL;
    }

This clause should free the allocated command string before exiting; currently,
it is leaked.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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