From: Remi Gacogne Date: Wed, 10 Jan 2018 13:18:10 +0000 (+0100) Subject: rec: Initialize the result var before calling the preoutquery hook X-Git-Tag: dnsdist-1.3.0~150^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17cecc84cc0e9f7b1dc9991e2568d1f8f4fc2b08;p=pdns rec: Initialize the result var before calling the preoutquery hook If the `preoutquery` hook was defined but didn't handle the query, the resulting variable was left uninitialized. --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index f31621e02..9d4e3fa3c 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -2352,7 +2352,7 @@ bool SyncRes::processRecords(const std::string& prefix, const DNSName& qname, co bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname, const QType& qtype, LWResult& lwr, boost::optional& ednsmask, const DNSName& auth, bool const sendRDQuery, const DNSName& nsName, const ComboAddress& remoteIP, bool doTCP, bool* truncated) { - int resolveret; + int resolveret = RCode::NoError; s_outqueries++; d_outqueries++;