summaryrefslogtreecommitdiff
path: root/plugins/PasteIt/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/PasteIt/src
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'plugins/PasteIt/src')
-rw-r--r--plugins/PasteIt/src/PasteToWeb.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/PasteIt/src/PasteToWeb.cpp b/plugins/PasteIt/src/PasteToWeb.cpp
index 7a98dcf5b8..536bf8001f 100644
--- a/plugins/PasteIt/src/PasteToWeb.cpp
+++ b/plugins/PasteIt/src/PasteToWeb.cpp
@@ -456,14 +456,12 @@ char* PasteToWeb::SendToWeb(char* url, std::map<std::string, std::string>& heade
char *resCont = nullptr;
nlhr.headersCount = nHeaders;
- NETLIBHTTPREQUEST* nlhrReply = Netlib_HttpTransaction(g_hNetlibUser, &nlhr);
+ NLHR_PTR nlhrReply(Netlib_HttpTransaction(g_hNetlibUser, &nlhr));
if (nlhrReply != nullptr) {
if (nlhrReply->resultCode == 200) {
resCont = nlhrReply->pData;
nlhrReply->pData = 0;
}
-
- Netlib_FreeHttpRequest(nlhrReply);
}
delete[] httpHeaders;