summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/server.cpp
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/ICQ-WIM/src/server.cpp
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp4
1 files changed, 1 insertions, 3 deletions
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;