gresolv: Destroy query at the relevant place when parsing the response
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Mon, 28 Jan 2013 13:43:11 +0000 (15:43 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 28 Jan 2013 14:18:28 +0000 (16:18 +0200)
commitfd0bc5cdfaa1d0bf6abf32e71abde45f581572ee
treec5e7a47aaa2455cab3e56b5bcc845bafe475bc74
parent82c0faebfe4df59c8722271874e83a0db4ceefef
gresolv: Destroy query at the relevant place when parsing the response

parse_response() will eventually call sort_and_return_results() which in turn
will call the result function. But the result function might cancel the gresolv.
At that point all queries belonging to this gresolv are destroyed. Returning back
to parse_response(), it calls again destroy_query() on an already destroyed one.
Thus leading to a crash.

Same issue with query_timeout()

Reported by Daniel Wagner
gweb/gresolv.c