diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-24 14:30:13 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-24 14:30:13 +0300 |
commit | 103de9c164934b2393dfcba7011625f90c8a2097 (patch) | |
tree | f7a4a09afe29398f3b7605d7d0db264638a18150 /protocols/VKontakte/src/vk_queue.cpp | |
parent | 541eab20530165d10592a9fda590f435c6a8b4be (diff) |
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/VKontakte/src/vk_queue.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index 5cbf3a5d08..8a874fb469 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -64,8 +64,7 @@ bool CVkProto::ExecuteRequest(AsyncHttpRequest *pReq) }
debugLogA("CVkProto::ExecuteRequest \n====\n%s\n====\n", pReq->szUrl);
- NETLIBHTTPREQUEST *reply = Netlib_HttpTransaction(m_hNetlibUser, pReq);
-
+ NLHR_PTR reply(Netlib_HttpTransaction(m_hNetlibUser, pReq));
{
mir_cslock lck(m_csWorkThreadTimer);
if (tLocalWorkThreadTimer != m_tWorkThreadTimer) {
@@ -81,8 +80,6 @@ bool CVkProto::ExecuteRequest(AsyncHttpRequest *pReq) if (pReq->m_bApiReq)
m_hAPIConnection = reply->nlc;
-
- Netlib_FreeHttpRequest(reply);
}
else if (pReq->bIsMainConn) {
if (IsStatusConnecting(m_iStatus))
|