[PATCH 1/2] s6dns_resolve_parse: always clean up dt, prevent fd leaking

2015-06-11 Thread Roman I Khimov
It was noted that with no servers in resolv.conf s6-dns always leaks an fd after s6dns_resolve_parse_g() usage. I wasn't able to trace it deeper, but always cleaning up in s6dns_resolve_parse() won't hurt. --- src/libs6dns/s6dns_resolve_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 2/2] s6dns-resolve.h: make it C++ compatible

2015-06-11 Thread Roman I Khimov
Can't use 'or' in macro, C++ compiler will complain: /usr/include/s6-dns/s6dns-resolve.h:223:40: error: or may not appear in macro parameter list #define s6dns_resolven_loop_g(list, n, or, deadline) s6dns_resolven(list, n, or, (deadline), STAMP) --- src/include/s6-dns/s6dns-resolve.h | 2 +-

Re: [PATCH 1/2] s6dns_resolve_parse: always clean up dt, prevent fd leaking

2015-06-11 Thread Laurent Bercot
On 11/06/2015 16:06, Roman I Khimov wrote: It was noted that with no servers in resolv.conf s6-dns always leaks an fd after s6dns_resolve_parse_g() usage. I wasn't able to trace it deeper, but always cleaning up in s6dns_resolve_parse() won't hurt. Thanks for the report! However, this isn't