Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] HEADS-UP: libpspf2 causes milter-greylist memory leak

2008-10-24 by Hajimu UMEMOTO

Hi,

>>>>> On Fri, 24 Oct 2008 05:27:18 +0200
>>>>> manu@... said:

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

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

I contributed the chunk to milter-greylist.
Where there is res_ndestroy(), we do use it.
Where there is no res_ndestroy(), we use res_nclose().
Where there is no res_n* API, we use old res_init API, and we don't
need to issue res_nclose() nor res_ndestroy().
I believe it covers all variations of the BIND resolver.
If I'm thinking in a wrong way, please let me know.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@...  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

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.