1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

sd-resolve: keep floating query referenced while we access it

This commit is contained in:
Lennart Poettering 2014-08-12 19:28:32 +02:00
parent 84e51726a3
commit 502fe44ea4
Notes: Lennart Poettering 2014-08-19 20:52:44 +02:00
Backport: bugfix

View File

@ -772,13 +772,15 @@ static int complete_query(sd_resolve *resolve, sd_resolve_query *q) {
assert_not_reached("Cannot complete unknown query type");
}
resolve->current = sd_resolve_query_unref(q);
resolve->current = NULL;
if (q->floating) {
resolve_query_disconnect(q);
sd_resolve_query_unref(q);
}
sd_resolve_query_unref(q);
return r;
}