summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-resolve/sd-resolve.c4
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;
}