summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r--protocols/ICQ-WIM/src/http.cpp3
-rw-r--r--protocols/ICQ-WIM/src/server.cpp4
2 files changed, 2 insertions, 5 deletions
diff --git a/protocols/ICQ-WIM/src/http.cpp b/protocols/ICQ-WIM/src/http.cpp
index 87819b1849..419342460d 100644
--- a/protocols/ICQ-WIM/src/http.cpp
+++ b/protocols/ICQ-WIM/src/http.cpp
@@ -172,7 +172,7 @@ bool CIcqProto::ExecuteRequest(AsyncHttpRequest *pReq)
}
bool bRet;
- NETLIBHTTPREQUEST *reply = Netlib_HttpTransaction(m_hNetlibUser, pReq);
+ NLHR_PTR reply(Netlib_HttpTransaction(m_hNetlibUser, pReq));
if (reply != nullptr) {
if (pReq->m_conn != CONN_NONE) {
auto &conn = m_ConnPool[pReq->m_conn];
@@ -207,7 +207,6 @@ bool CIcqProto::ExecuteRequest(AsyncHttpRequest *pReq)
if (pReq->m_pFunc != nullptr)
(this->*(pReq->m_pFunc))(reply, pReq);
- Netlib_FreeHttpRequest(reply);
bRet = true;
}
else {
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index d1600d79d2..2bc5723a80 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -417,7 +417,7 @@ bool CIcqProto::RefreshRobustToken()
CMStringA szAgent(FORMAT, "%S Mail.ru Windows ICQ (version 10.0.1999)", (wchar_t*)m_szOwnId);
tmp->AddHeader("User-Agent", szAgent);
- NETLIBHTTPREQUEST *reply = Netlib_HttpTransaction(m_hNetlibUser, tmp);
+ NLHR_PTR reply(Netlib_HttpTransaction(m_hNetlibUser, tmp));
if (reply != nullptr) {
m_ConnPool[CONN_RAPI].s = reply->nlc;
@@ -434,8 +434,6 @@ bool CIcqProto::RefreshRobustToken()
add->pUserInfo = &bRet;
ExecuteRequest(add);
}
-
- Netlib_FreeHttpRequest(reply);
}
else m_ConnPool[CONN_RAPI].s = nullptr;