summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-30 19:24:05 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-30 19:24:13 +0200
commitfcf57f9cf706ff5be2b5e6d41b2ac48e3e98467b (patch)
treef8805c08964eb7038dc92e5afd007176dbcba7ca /src/resolve
parent351e6342d59c790758c216db3c61e17cc2860fa9 (diff)
resolved: don't attempt to order empty answer array
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-scope.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
index 5141a8d804..4c53edb5a0 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/resolve/resolved-dns-scope.c
@@ -493,7 +493,8 @@ void dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p) {
if (r == 0)
return;
- dns_answer_order_by_scope(answer, in_addr_is_link_local(p->family, &p->sender) > 0);
+ if (answer)
+ dns_answer_order_by_scope(answer, in_addr_is_link_local(p->family, &p->sender) > 0);
r = dns_scope_make_reply_packet(s, DNS_PACKET_ID(p), DNS_RCODE_SUCCESS, p->question, answer, soa, &reply);
if (r < 0) {