Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

HEADS-UP: libpspf2 causes milter-greylist memory leak

2008-10-24 by manu@netbsd.org

Petar Bogdanovic <petar@...> wrote:

> > The BIND9's resolver requires res_ndestroy() for cleanup res_state.
> > However, libspf2 doesn't issue res_ndestroy() but issues res_nclose().
> > It causes memory leak.  The FreeBSD port of libspf2 has a patch to
> > address this issue.
> 
> Thanks, I applied all patches (~10) from the FreeBSD Ports tree and the
> problem is gone. The memory usage of milter-greylist is actually frozen
> now, no matter how hard I try. Also, the claimed cpu-time is much lower.

I have nothing to add about libspf2, I just changed the title so that
other people do not miss that.

People using --enable-dnsrbl may also have a problem on some systems.
dnsrbl.c contains:

#if (defined(res_ninit) || (__RES >= 19991006) )
#define HAVE_RESN       1
#ifndef res_ndestroy
#define res_ndestroy(res)       res_nclose(res)
#endif
#else 
#define res_ninit(res) \
        ((_res.options & RES_INIT) == 0 && res_init())
#define res_nquery(res, req, class, type, ans, anslen)  \ 
        res_query(req, class, type, ans, anslen)
#define res_ndestroy(res) 
#endif

At mine (NetBSD 4.0, built-in BIND 9), this does not touch
res_ndestroy(), so I am safe.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.