summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-07-24 14:30:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-07-24 14:30:13 +0300
commit103de9c164934b2393dfcba7011625f90c8a2097 (patch)
treef7a4a09afe29398f3b7605d7d0db264638a18150 /protocols/Discord
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/connection.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp
index da7f777d59..1842fe1331 100644
--- a/protocols/Discord/src/connection.cpp
+++ b/protocols/Discord/src/connection.cpp
@@ -41,15 +41,13 @@ void CDiscordProto::ExecuteRequest(AsyncHttpRequest *pReq)
}
debugLogA("Executing request #%d:\n%s", pReq->m_iReqNum, pReq->szUrl);
- NETLIBHTTPREQUEST *reply = Netlib_HttpTransaction(m_hNetlibUser, pReq);
+ NLHR_PTR reply(Netlib_HttpTransaction(m_hNetlibUser, pReq));
if (reply != nullptr) {
if (pReq->m_pFunc != nullptr)
(this->*(pReq->m_pFunc))(reply, pReq);
if (pReq->m_bMainSite)
m_hAPIConnection = reply->nlc;
-
- Netlib_FreeHttpRequest(reply);
}
else {
debugLogA("Request %d failed", pReq->m_iReqNum);