diff options
-rw-r--r-- | gweb/gresolv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gweb/gresolv.c b/gweb/gresolv.c index 440f43c1..fd4cf107 100644 --- a/gweb/gresolv.c +++ b/gweb/gresolv.c @@ -866,6 +866,7 @@ GResolv *g_resolv_ref(GResolv *resolv) void g_resolv_unref(GResolv *resolv) { struct resolv_query *query; + struct resolv_lookup *lookup; if (resolv == NULL) return; @@ -873,6 +874,9 @@ void g_resolv_unref(GResolv *resolv) if (__sync_fetch_and_sub(&resolv->ref_count, 1) != 1) return; + while ((lookup = g_queue_pop_head(resolv->lookup_queue))) + g_resolv_cancel_lookup(resolv, lookup->id); + while ((query = g_queue_pop_head(resolv->query_queue))) destroy_query(query); |