summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-11-30 11:09:15 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-11-30 11:09:15 +0000
commit2a7455c1a32af95540cba11715cdc44005e6695d (patch)
tree1b2aa5a750d22caa461da47f56b8fe6b7e5181a3
parent59ee4808c6588f2f3bcc01ce4b6fe209846cf7e6 (diff)
Not being able to create a resolver is not a fatal condition in unwind,
there might be others still working. Make sure check_resolver() handles this correctly.
-rw-r--r--sbin/unwind/resolver.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c
index 4eb968f01fc..32e3f341935 100644
--- a/sbin/unwind/resolver.c
+++ b/sbin/unwind/resolver.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolver.c,v 1.84 2019/11/29 15:22:02 florian Exp $ */
+/* $OpenBSD: resolver.c,v 1.85 2019/11/30 11:09:14 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -1322,6 +1322,9 @@ check_resolver(struct uw_resolver *resolver_to_check)
{
struct uw_resolver *res;
+ if (resolver_to_check == NULL)
+ return;
+
if (resolver_to_check->check_running) {
log_debug("%s: already checking: %s", __func__,
uw_resolver_type_str[resolver_to_check->type]);
@@ -1330,7 +1333,7 @@ check_resolver(struct uw_resolver *resolver_to_check)
log_debug("%s: create_resolver", __func__);
if ((res = create_resolver(resolver_to_check->type, 0)) == NULL)
- fatal("%s", __func__);
+ return;
resolver_ref(resolver_to_check);
@@ -1355,7 +1358,7 @@ check_resolver(struct uw_resolver *resolver_to_check)
log_debug("%s: create_resolver for oppdot", __func__);
if ((res = create_resolver(resolver_to_check->type, 1)) == NULL)
- fatal("%s", __func__);
+ return;
resolver_ref(resolver_to_check);