This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14122] memory leak in nss_parse_service_list()
- 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:16:05 +0000
- Subject: [Bug libc/14122] memory leak in nss_parse_service_list()
- Auto-submitted: auto-generated
- References: <bug-14122-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14122
--- Comment #5 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-05-19 22:16:05 UTC ---
I've reproduced your leak:
==14114== 300 (60 direct, 240 indirect) bytes in 1 blocks are definitely lost
in loss record 14 of 14
==14114== at 0x4C2A4D6: malloc (vg_replace_malloc.c:263)
==14114== by 0x4F2DDCA: nss_parse_service_list
(/build/buildd/eglibc-2.11.1/nss/nsswitch.c:622)
==14114== by 0x4F2E6ED: __nss_database_lookup
(/build/buildd/eglibc-2.11.1/nss/nsswitch.c:164)
==14114== by 0x55B83CF: ???
==14114== by 0x55BA244: ???
==14114== by 0x4EDC9FC: getpwuid_r@@GLIBC_2.2.5
(/build/buildd/eglibc-2.11.1/pwd/../nss/getXXbyYY_r.c:253)
==14114== by 0x4EDC2EE: getpwuid
(/build/buildd/eglibc-2.11.1/pwd/../nss/getXXbyYY.c:117)
==14114== by 0x40058C: main (/tmp/t.c:3)
by sticking an invalid entry into /etc/nsswitch.conf:
passwd: [FOOFFOO] files cache
Also reproduces with current git trunk build:
==14568== 292 (52 direct, 240 indirect) bytes in 1 blocks are definitely lost
in loss record 14 of 14
==14568== at 0x4A0A4D6: malloc (vg_replace_malloc.c:263)
==14568== by 0x4D09804: nss_parse_service_list
(/glibc-git/nss/nsswitch.c:595)
==14568== by 0x4D09F3B: __nss_database_lookup
(/glibc-git/nss/nsswitch.c:144)
==14568== by 0x53DD3CF: ???
==14568== by 0x53DF244: ???
==14568== by 0x4CC8B3B: getpwuid_r@@GLIBC_2.2.5
(/glibc-git/pwd/../nss/getXXbyYY_r.c:255)
==14568== by 0x4CC83ED: getpwuid (/glibc-git/pwd/../nss/getXXbyYY.c:116)
==14568== by 0x40058C: main (/tmp/t.c:3)
--
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.