On Fri, Apr 28, 2006 at 06:51:54PM +0200, Slaven Rezic wrote:
#include netdb.h
main() {
struct protoent *pent;
while(1) {
pent = getprotobyname(tcp);
}
}
valgrind shows that the leaking function is fopen(), called from
getprotobyname_r(). It seems that getprotobyname_r()
Package: libc6
Version: 2.3.6-7
Severity: normal
A memory leak can be observed by using getprotobyname. A test program:
#include netdb.h
main() {
struct protoent *pent;
while(1) {
pent = getprotobyname(tcp);
}
}
Compile and run the program and watch the memory consumption
2 matches
Mail list logo