This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2314] New: nss_parse_service_list leaks a tiny amount of memory
- From: "david at edeca dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 9 Feb 2006 20:04:15 -0000
- Subject: [Bug libc/2314] New: nss_parse_service_list leaks a tiny amount of memory
- Reply-to: sourceware-bugzilla at sourceware dot org
In nsswitch.c:519 (CVS file version 1.61), new_service is malloc()ed but never
free()d. This results in minor memory leaks (~300 bytes) according to
valgrind.
The valgrind trace is below. I tried fixing this one myself but failed
miserably :)
==2459== 312 (72 direct, 240 indirect) bytes in 2 blocks are definitely lost in
loss record 3 of 11
==2459== at 0x401B45B: malloc
(in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==2459== by 0x43B67E8: nss_parse_service_list (nsswitch.c:519)
==2459== by 0x43B60D8: __nss_database_lookup (nsswitch.c:134)
==2459== by 0x450F1DB: ???
==2459== by 0x451075C: ???
==2459== by 0x43766B3: getpwnam_r@@GLIBC_2.1.2 (getXXbyYY_r.c:207)
==2459== by 0x43761CE: getpwnam (getXXbyYY.c:103)
==2459== by (my program)
--
Summary: nss_parse_service_list leaks a tiny amount of memory
Product: glibc
Version: 2.3.6
Status: NEW
Severity: minor
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: david at edeca dot net
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=2314
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.