summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer/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 /plugins/HTTPServer/src
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'plugins/HTTPServer/src')
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 285cc7595f..ebb4f0587f 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -151,7 +151,7 @@ unsigned long GetExternIP(const char *szURL, const char *szPattern)
IN_ADDR externIP;
externIP.s_addr = 0;
- NETLIBHTTPREQUEST *nlreply = Netlib_HttpTransaction(hNetlibUser, &nlhr);
+ NLHR_PTR nlreply(Netlib_HttpTransaction(hNetlibUser, &nlhr));
if (nlreply) {
if (nlreply->resultCode >= 200 && nlreply->resultCode < 300) {
nlreply->pData[nlreply->dataLength] = 0;// make sure its null terminated
@@ -171,7 +171,6 @@ unsigned long GetExternIP(const char *szURL, const char *szPattern)
if ((externIP.s_addr = inet_addr(pszIp)) == INADDR_NONE)
externIP.s_addr = 0;
}
- Netlib_FreeHttpRequest(nlreply);
}
::SetCursor(hPrevCursor);
return ntohl(externIP.s_addr);