summaryrefslogtreecommitdiff
path: root/protocols/Non-IM Contact/src
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/Non-IM Contact/src
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/Non-IM Contact/src')
-rw-r--r--protocols/Non-IM Contact/src/http.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/protocols/Non-IM Contact/src/http.cpp b/protocols/Non-IM Contact/src/http.cpp
index a7eaca69cb..55e648c248 100644
--- a/protocols/Non-IM Contact/src/http.cpp
+++ b/protocols/Non-IM Contact/src/http.cpp
@@ -48,7 +48,7 @@ int InternetDownloadFile(char *szUrl)
nlhr.headers[nlhr.headersCount - 1].szValue = NETLIB_USER_AGENT;
// download the page
- NETLIBHTTPREQUEST *nlhrReply = Netlib_HttpTransaction(hNetlibUser, &nlhr);
+ NLHR_PTR nlhrReply(Netlib_HttpTransaction(hNetlibUser, &nlhr));
if (nlhrReply) {
// return error code if the recieved code is neither 200 OK or 302 Moved
if (nlhrReply->resultCode != 200 && nlhrReply->resultCode != 302)
@@ -81,7 +81,6 @@ int InternetDownloadFile(char *szUrl)
// make a copy of the retrieved data, then free the memory of the http reply
szInfo = szData;
- Netlib_FreeHttpRequest(nlhrReply);
// the recieved data is empty, data was not recieved, so return an error code of 1
if (!mir_strcmp(szInfo, "")) return 1;