summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_opt.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/JabberG/src/jabber_opt.cpp
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/JabberG/src/jabber_opt.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_opt.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index 3ade180008..c8eb921250 100755
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -715,7 +715,7 @@ private:
request.flags = NLHRF_REDIRECT | NLHRF_HTTP11;
request.szUrl = JABBER_SERVER_URL;
- NETLIBHTTPREQUEST *result = Netlib_HttpTransaction(wnd->GetProto()->m_hNetlibUser, &request);
+ NLHR_PTR result(Netlib_HttpTransaction(wnd->GetProto()->m_hNetlibUser, &request));
if (result) {
if (result->resultCode == 200 && result->dataLength && result->pData) {
TiXmlDocument doc;
@@ -725,7 +725,6 @@ private:
bIsError = false;
}
}
- Netlib_FreeHttpRequest(result);
}
if (bIsError)
@@ -1600,7 +1599,7 @@ private:
request.flags = NLHRF_HTTP11;
request.szUrl = JABBER_SERVER_URL;
- NETLIBHTTPREQUEST *result = Netlib_HttpTransaction(wnd->GetProto()->m_hNetlibUser, &request);
+ NLHR_PTR result(Netlib_HttpTransaction(wnd->GetProto()->m_hNetlibUser, &request));
if (result && IsWindow(hwnd)) {
if ((result->resultCode == 200) && result->dataLength && result->pData) {
TiXmlDocument doc;
@@ -1614,8 +1613,6 @@ private:
}
}
- if (result)
- Netlib_FreeHttpRequest(result);
if (bIsError)
SendMessage(hwnd, WM_JABBER_REFRESH, 0, 0);
}