Crash at purple_dnsquery_destroy()

ccpaging ccpaging at
Thu Nov 6 23:12:14 EST 2008

I have found same problem in my wifi network both in ubuntu and windows.
The solution seems working now.


发件人: Jacky Lam
发送时间: 2008-11-06 15:22:37
收件人: devel
主题: Crash at purple_dnsquery_destroy()

Dear all,
Currently, I experience crash at dnsquery.c:purple_dnsquery_destroy()
when my WiFi AP suddenly off while I am online with libpurple.
After tracing, I find the data struct PurpleDnsQueryData is freeing
twice. The reason is when purple_dnsquery_failed() is called,
purple_dnsquery_destroy() will try to free the PurpleDnsQueryData's
resolver and itself. But purple_dnsquery_resolver_destroy()'s kill()
will trigger the glib's input hook and finally called host_resolved()
and eventually call purple_dnsquery_failed() again!!
My solution is simple. Just reverse the older to free the object will be ok.
Origin code:
if (resolver->dns_pid > 0)
kill(resolver->dns_pid, SIGKILL);
if (resolver->inpa != 0)
Fixed code:
if (resolver->inpa != 0)
if (resolver->dns_pid > 0)
kill(resolver->dns_pid, SIGKILL);
I don't know if it applies to all platform nor it has better way to do
that, but hope it is useful to others having this problem.
Devel mailing list
Devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Devel mailing list