From 4b035819cb24300f520f577fa76e9d9ec7cc6948 Mon Sep 17 00:00:00 2001 From: jeefo Date: Sun, 22 Sep 2019 01:01:24 +0300 Subject: [PATCH] Fixed possible addrinfo leak. --- include/crlib/cr-http.h | 1 + source/basecode.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/crlib/cr-http.h b/include/crlib/cr-http.h index 869d6bf..209d13a 100644 --- a/include/crlib/cr-http.h +++ b/include/crlib/cr-http.h @@ -84,6 +84,7 @@ public: m_socket = static_cast (socket (result->ai_family, result->ai_socktype, 0)); if (m_socket < 0) { + freeaddrinfo (result); return false; } diff --git a/source/basecode.cpp b/source/basecode.cpp index 01338fc..f458a40 100644 --- a/source/basecode.cpp +++ b/source/basecode.cpp @@ -3875,7 +3875,7 @@ void Bot::defuseBomb_ () { } // we are defusing bomb - if (m_hasProgressBar || pickupExists || (m_oldButtons & IN_USE)) { + if (m_hasProgressBar || (m_oldButtons & IN_USE)) { pev->button |= IN_USE; m_reloadState = Reload::None;