gresolv: Avoid accessing already freed memory
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Mon, 15 Oct 2012 10:36:03 +0000 (13:36 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 16 Oct 2012 09:19:16 +0000 (12:19 +0300)
commit8b9ed30d94dcfd52a7de68aa39937505599ce722
tree6d8d905b027678a8e9a3db161ea62b115da44c28
parent0306d64c9033814eae433cab973e68befef52525
gresolv: Avoid accessing already freed memory

We must remove the lookup from lookup queue and query from query queue
before calling user callback. The callback might unref the GResolv which in
turn would remove the lookup/query what we are trying to access after
the callback is returned.

So it is enough to remove the lookup or query entry from queue before
cb is called and then manually remove it after the callback has returned.
gweb/gresolv.c