summaryrefslogtreecommitdiff
path: root/src/mir_app
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 /src/mir_app
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/netlibautoproxy.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mir_app/src/netlibautoproxy.cpp b/src/mir_app/src/netlibautoproxy.cpp
index 842ac5234a..63f823c8fd 100644
--- a/src/mir_app/src/netlibautoproxy.cpp
+++ b/src/mir_app/src/netlibautoproxy.cpp
@@ -59,7 +59,7 @@ static void GetFile(char *szUrl, AUTO_PROXY_SCRIPT_BUFFER &buf)
nlhr.szUrl = szUrl;
// download the page
- NETLIBHTTPREQUEST *nlhrReply = Netlib_HttpTransaction(&nlu, &nlhr);
+ NLHR_PTR nlhrReply(Netlib_HttpTransaction(&nlu, &nlhr));
if (nlhrReply) {
if (nlhrReply->resultCode == 200) {
buf.lpszScriptBuffer = nlhrReply->pData;
@@ -68,7 +68,6 @@ static void GetFile(char *szUrl, AUTO_PROXY_SCRIPT_BUFFER &buf)
nlhrReply->dataLength = 0;
nlhrReply->pData = nullptr;
}
- Netlib_FreeHttpRequest(nlhrReply);
}
}