diff options
author | 2019-02-05 19:32:24 +0000 | |
---|---|---|
committer | 2019-02-05 19:32:24 +0000 | |
commit | 8287f791ed28adc334d9a48e8695fe72a78916a0 (patch) | |
tree | c16a55ad19ca31226a7586d7f62d6dfc003f9d07 | |
parent | missing full stop; (diff) | |
download | wireguard-openbsd-8287f791ed28adc334d9a48e8695fe72a78916a0.tar.xz wireguard-openbsd-8287f791ed28adc334d9a48e8695fe72a78916a0.zip |
unref resolver in error branch
-rw-r--r-- | sbin/unwind/resolver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index 6ce00e41afe..ab1c2e571da 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.14 2019/02/03 12:02:30 florian Exp $ */ +/* $OpenBSD: resolver.c,v 1.15 2019/02/05 19:32:24 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -1342,9 +1342,11 @@ check_captive_portal(int timer_reset) if ((err = ub_resolve_event(res->ctx, resolver_conf->captive_portal_host, LDNS_RR_TYPE_A, LDNS_RR_CLASS_IN, res, check_captive_portal_resolve_done, - NULL)) != 0) + NULL)) != 0) { log_warn("%s: ub_resolve_async: err: %d, %s", __func__, err, ub_strerror(err)); + resolver_unref(res); + } } |