This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14122] memory leak in getpwuid()
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sat, 19 May 2012 22:07:06 +0000
- Subject: [Bug libc/14122] memory leak in getpwuid()
- Auto-submitted: auto-generated
- References: <bug-14122-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14122
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |ASSIGNED
AssignedTo|unassigned at sourceware |ppluzhnikov at google dot
|dot org |com
--- Comment #4 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-05-19 22:07:06 UTC ---
Thanks.
I do see several possibilities for a leak in nss_parse_service_list:
new_service = (service_user *) malloc (sizeof (service_user)
+ (line - name + 1));
...
/* Compare with known statii. */
if (line - name == 7)
{
if (__strncasecmp (name, "SUCCESS", 7) == 0)
status = NSS_STATUS_SUCCESS;
else if (__strncasecmp (name, "UNAVAIL", 7) == 0)
status = NSS_STATUS_UNAVAIL;
else
return result; /* <<< Leak? */
}
...
What does your /etc/nsswitch.conf look like?
> My glibc built from the git repository is not working
In what way does it not work?
It might be hard to verify the fix, unless I can reproduce the leak, or you can
get a git build working.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.