diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2022-11-29 11:56:33 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2022-11-29 11:56:33 +0000 |
commit | b9777fb7da571bda44cdaac9968e53afe12a0f78 (patch) | |
tree | ab296d8718601c9548ae996cd3d7e579a81104f3 | |
parent | 20b3889afa7f7a73607c92c8611dfd6ee155aed9 (diff) |
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
-rw-r--r-- | sbin/unwind/resolver.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 */ } |