mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
sd-resolve: keep floating query referenced while we access it
This commit is contained in:
parent
84e51726a3
commit
502fe44ea4
Notes:
Lennart Poettering
2014-08-19 20:52:44 +02:00
Backport: bugfix
@ -772,13 +772,15 @@ static int complete_query(sd_resolve *resolve, sd_resolve_query *q) {
|
|||||||
assert_not_reached("Cannot complete unknown query type");
|
assert_not_reached("Cannot complete unknown query type");
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve->current = sd_resolve_query_unref(q);
|
resolve->current = NULL;
|
||||||
|
|
||||||
if (q->floating) {
|
if (q->floating) {
|
||||||
resolve_query_disconnect(q);
|
resolve_query_disconnect(q);
|
||||||
sd_resolve_query_unref(q);
|
sd_resolve_query_unref(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sd_resolve_query_unref(q);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user