<div>Hi Michael,</div>
<div> </div>
<div>Could you point me to such places in the library as well as in application dnsget.</div>
<div>Seems if I keep the context open, and send multiple queries to it.</div>
<div>In case of errors will run into memory issues.</div>
<div> </div>
<div>Abhijit<br><br></div>
<div class="gmail_quote">On Fri, Sep 18, 2009 at 11:09 AM, Michael Tokarev <span dir="ltr">&lt;<a href="mailto:mjt@tls.msk.ru">mjt@tls.msk.ru</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Abhijit Pandey wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">In dnsget there is a memory leak before the return statement.<br>dns_close needs to be done.<br><br></div>
<div class="im">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> dns_close(NULL);<br></blockquote><br>   return errors ? 1 : notfound ? 100 : 0;<br> }<br></div></blockquote>
<br>Well, it&#39;s at the very end of main(), right before<br>return.  There&#39;s no need to free memory or close<br>filedescriptors there, since kernel will do that<br>all much quicker after exit - by freeing things<br>
here we&#39;re just wasting (some small amount of) time.<br><br>And if you&#39;re about fixing &quot;memory leaks&quot; like this,<br>you can as well check all error returns.  Which is,<br>again, useless.<br><br>/mjt<br></blockquote>
</div><br>