Hello Michael On 10/1/18 8:21 PM, Michael Becker wrote: > Hi, > > as I am not familiar with creating patches, I have simply got > the current version of resolver.3 from git and attached my > modified version. Hope this is OK for you. > > I found the neccessary information in the glibc sources. A patch is preferred :-). Just use "git diff"... Anyway, thanks for the update, I applied as the patch below. Cheers, Michael --- a/man3/resolver.3 +++ b/man3/resolver.3 @@ -32,7 +32,7 @@ .\" .TH RESOLVER 3 2017-09-15 "GNU" "Linux Programmer's Manual" .SH NAME -res_ninit, res_nquery, res_nsearch, res_nquerydomain, res_nmkquery, res_nsend, +res_ninit, res_nclose, res_nquery, res_nsearch, res_nquerydomain, res_nmkquery, res_nsend, res_init, res_query, res_search, res_querydomain, res_mkquery, res_send, dn_comp, dn_expand \- resolver routines .SH SYNOPSIS @@ -46,6 +46,8 @@ dn_comp, dn_expand \- resolver routines .PP .BI "int res_ninit(res_state " statep ); .PP +.BI "void res_nclose(res_state " statep ); +.PP .BI "int res_nquery(res_state " statep , .BI " const char *" dname ", int " class ", int " type , .BI " unsigned char *" answer ", int " anslen ); @@ -146,6 +148,14 @@ or .BR res_init () is normally executed by the first call to one of the other functions. +Every call to +.BR res_ninit () +requires a corresponding call to +.BR res_nclose () +to free memory allocated by +.BR res_ninit () +and subsequent calls to +.BR res_nquery (). .PP The .BR res_nquery () @@ -468,6 +478,7 @@ l l l. Interface Attribute Value T{ .BR res_ninit (), +.BR res_nclose (), .BR res_nquery (), .br .BR res_nsearch (), -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/