On 3/21/2011 6:47 PM, Jared Yanovich wrote:
On Mon, Mar 21, 2011 at 10:26:00AM +0100, Gilles Chehade wrote:
The original asr.c code looks ok to me, can you explain why you think it has
an error ?
Experimentally, we traced that asr was not getting freed under certain
circumstances.
Theoretically, the pointer is lost and the asr argument to that routine
will not be freed since the only reference to an instance of asr is
held by the single global pointer asr in dns.c. So if there is ever
a situation where the asr_ctx_unref() returns zero, asr leaks.
Try tracing the refcount in asr_done()...
Strange :-/
I'll be mostly offline for the next two days but I'll look at it and try
to understand what's happening with the asr context.
The asr_done() fix does not seem correct to me but i'm not very familiar
with asr so I need more time to make up my mind :p
Gilles