The lookup must be removed from lookup queue and not from query
queue when cancelling the lookup. Otherwise it is possible that
we might access already removed lookup that is still found in
lookup queue.

Fixes BMC#25728
---
 gweb/gresolv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gweb/gresolv.c b/gweb/gresolv.c
index 79abc9b..77c1afb 100644
--- a/gweb/gresolv.c
+++ b/gweb/gresolv.c
@@ -1043,8 +1043,8 @@ gboolean g_resolv_cancel_lookup(GResolv *resolv, guint id)
        if (list == NULL)
                return FALSE;
 
+       g_queue_remove(resolv->lookup_queue, list->data);
        destroy_lookup(list->data);
-       g_queue_remove(resolv->query_queue, list->data);
 
        return TRUE;
 }
-- 
1.7.11.4

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to