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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6167%2Fhead;p=thirdparty%2Fpdns.git 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 f31621e023..9d4e3fa3c7 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++;