memory leak in threaded getpwuid_r() usage

memory leak in threaded getpwuid_r() usage

Hi,

Trying to use getpwuid_r() in a threaded application. (Code is attached
at the end of the message.) But in the "ps -p <PID> -o rss,size" output
of the program, RSS increases by time while SIZE remains stable.

After exploring the web, I've found some other people
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=273051) facing with
the same bug. AFAICS, there's a problem with some versions of the
libnss package. I'd be so appreciated if you can help me to figure out
the source of the problem and how can I solve it.

Tests were made using libc6 2.3.2.ds1-22 and libnss-db 2.2-6.3 on
debian stable (sarge).