diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-12 19:28:32 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-12 19:28:32 +0200 |
commit | 502fe44ea44fdbe2282fbe0625bb2e01777425c0 (patch) | |
tree | c0a57bf0c316e882b620b0cfa6ec37c324f77107 /src | |
parent | 84e51726a38e133ca42d2f30f0668d3921b210cb (diff) |
sd-resolve: keep floating query referenced while we access it
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-resolve/sd-resolve.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c index 10f8ed29a2..df63f1de9e 100644 --- a/src/libsystemd/sd-resolve/sd-resolve.c +++ b/src/libsystemd/sd-resolve/sd-resolve.c @@ -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; } |