Merge pull request #10921

edea850 general: replace auto_scope_leave_caller with scope_guard (jeffro256)

ACKs: selsta, tobtoht
This commit is contained in:
tobtoht
2026-07-22 16:31:31 +00:00
57 changed files with 128 additions and 205 deletions
+5 -6
View File
@@ -27,17 +27,17 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "common/dns_utils.h"
#include "common/threadpool.h"
#include "crypto/crypto.h"
// check local first (in the event of static or in-source compilation of libunbound)
#include "misc_language.h"
#include "misc_log_ex.h"
#include "scope_guard.h"
#include "unbound.h"
#include <deque>
#include <set>
#include <stdlib.h>
#include <cstring>
#include "include_base_utils.h"
#include "common/threadpool.h"
#include "crypto/crypto.h"
#include <boost/thread/mutex.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/optional.hpp>
@@ -271,8 +271,7 @@ std::vector<std::string> DNSResolver::get_record(const std::string& url, int rec
ub_result *result;
// Make sure we are cleaning after result.
epee::misc_utils::auto_scope_leave_caller scope_exit_handler =
epee::misc_utils::create_scope_leave_handler([&](){
const epee::scope_guard scope_exit_handler([&](){
ub_resolve_free(result);
});