From: florian Date: Tue, 29 Nov 2022 11:56:32 +0000 (+0000) Subject: Ignore late check results for resolvers we no longer use. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f9ac8ea83bb4b72b0224cdcd4e6f6535b4c02b4f;p=openbsd Ignore late check results for resolvers we no longer use. Since we no longer use that specific resolver there is also no need to re-check it. tb pointed out that prev_state might be used uninitialized in this case. OK tb --- diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index 74ff6f771df..93ec7b77a98 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.155 2022/03/12 14:35:29 florian Exp $ */ +/* $OpenBSD: resolver.c,v 1.156 2022/11/29 11:56:32 florian Exp $ */ /* @@ -1536,7 +1536,7 @@ check_resolver_done(struct uw_resolver *res, void *arg, int rcode, if (checked_resolver != resolvers[checked_resolver->type]) { log_debug("%s: %s: ignoring late check result", __func__, uw_resolver_type_str[checked_resolver->type]); - goto out; + goto ignore_late; } prev_state = checked_resolver->state; @@ -1610,6 +1610,7 @@ out: &checked_resolver->check_tv); } +ignore_late: resolver_unref(checked_resolver); res->stop = 1; /* do not free in callback */ }