This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/462] New: Leak in libresolv
- From: "gpizzol at telehumana dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 19 Oct 2004 22:12:54 -0000
- Subject: [Bug libc/462] New: Leak in libresolv
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
Mtrace reports a memory leak in the following source code fro both glibc 2.3.2
and 2.3.3. Is there any known memory leak issue in the current libresolv or am I
missing something?
#include <stdio.h>
#include <errno.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <sys/types.h>
#include <resolv.h>
#include <netdb.h>
int
main (int argc, char *argv[])
{
unsigned char buf[256];
struct __res_state dnsstate;
mtrace();
res_ninit(&dnsstate);
res_nquery (&dnsstate,"1.0.0.127.in-addr.arpa.", C_ANY, T_ANY, buf,
256);
res_nclose(&dnsstate);
return 0;
}
============================================
Memory not freed:
-----------------
Address Size Caller
0x0804a3c8 0x1c at 0x400470db
--
Summary: Leak in libresolv
Product: glibc
Version: 2.3.3
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: gpizzol at telehumana dot com
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=462
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.