summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src')
-rwxr-xr-xprotocols/JabberG/src/jabber_opt.cpp7
-rwxr-xr-xprotocols/JabberG/src/jabber_util.cpp3
2 files changed, 3 insertions, 7 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);
}
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 87b69204e7..2631783213 100755
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -893,7 +893,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param)
nlhr.szUrl = it->Url;
nlhr.nlc = hHttpCon;
- NETLIBHTTPREQUEST *res = Netlib_HttpTransaction(m_hNetlibUser, &nlhr);
+ NLHR_PTR res(Netlib_HttpTransaction(m_hNetlibUser, &nlhr));
if (res) {
hHttpCon = res->nlc;
if (res->resultCode == 200 && res->dataLength) {
@@ -936,7 +936,6 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param)
}
}
}
- Netlib_FreeHttpRequest(res);
}
else hHttpCon = nullptr;
}