diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-02-05 19:32:25 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-02-05 19:32:25 +0000 |
commit | 120e6b552c34597812e11d0548ee94172573dc22 (patch) | |
tree | f2ad89411f96d56d1a93f6e5540057cc84ece610 /sbin | |
parent | e476cf08ac04bfce1de765d755e62f688295bdc3 (diff) |
unref resolver in error branch
Diffstat (limited to 'sbin')
-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); + } } |