From: W.C.A. Wijngaards Date: Fri, 14 Feb 2020 09:33:33 +0000 (+0100) Subject: dnstap io, fix clang analysis warning X-Git-Tag: 1.11.0rc1~120^2~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=748b70ae8bf082b2967f0fb84f90b4ee4844e187;p=thirdparty%2Funbound.git dnstap io, fix clang analysis warning --- diff --git a/dnstap/dtstream.c b/dnstap/dtstream.c index 4af83cd41..7474de1e3 100644 --- a/dnstap/dtstream.c +++ b/dnstap/dtstream.c @@ -275,6 +275,10 @@ int dt_io_thread_apply_cfg(struct dt_io_thread* dtio, struct config_file *cfg) } if(dtio->upstream_is_tcp || dtio->upstream_is_tls) { + if(!cfg->dnstap_ip || cfg->dnstap_ip[0] == 0) { + log_err("dnstap setup: no dnstap-ip for TCP connect"); + return 0; + } free(dtio->ip_str); dtio->ip_str = strdup(cfg->dnstap_ip); if(!dtio->ip_str) {