abhijpandey at gmail.com
Fri Sep 18 22:43:10 MSD 2009
Could you point me to such places in the library as well as in application
Seems if I keep the context open, and send multiple queries to it.
In case of errors will run into memory issues.
On Fri, Sep 18, 2009 at 11:09 AM, Michael Tokarev <mjt at tls.msk.ru> wrote:
> Abhijit Pandey wrote:
>> In dnsget there is a memory leak before the return statement.
>> dns_close needs to be done.
>> return errors ? 1 : notfound ? 100 : 0;
> Well, it's at the very end of main(), right before
> return. There's no need to free memory or close
> filedescriptors there, since kernel will do that
> all much quicker after exit - by freeing things
> here we're just wasting (some small amount of) time.
> And if you're about fixing "memory leaks" like this,
> you can as well check all error returns. Which is,
> again, useless.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the udns