diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index 8ad50ba29b..48e5321d79 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -1005,6 +1005,7 @@ static void resolve_service_all_complete(DnsQuery *q) { goto finish; } + assert(bad->auxiliary_result < 0); r = bad->auxiliary_result; goto finish; } @@ -1112,7 +1113,7 @@ static void resolve_service_hostname_complete(DnsQuery *q) { return; /* This auxiliary lookup is finished or failed, let's see if all are finished now. */ - q->auxiliary_result = r; + q->auxiliary_result = r < 0 ? r : 0; resolve_service_all_complete(q->auxiliary_for); }