The order of actions is important here.
---
 gweb/gresolv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gweb/gresolv.c b/gweb/gresolv.c
index cf7f2e9..d30e2f1 100644
--- a/gweb/gresolv.c
+++ b/gweb/gresolv.c
@@ -1052,9 +1052,9 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const 
char *hostname,
        if (resolv->result_family != AF_INET) {
                if (add_query(lookup, hostname, ns_t_aaaa)) {
                        if (resolv->result_family != AF_INET6) {
-                               destroy_query(lookup->ipv4_query);
                                g_queue_remove(resolv->query_queue,
                                                lookup->ipv4_query);
+                               destroy_query(lookup->ipv4_query);
                        }
 
                        g_free(lookup);
-- 
1.7.11.4

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to