From 103de9c164934b2393dfcba7011625f90c8a2097 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 24 Jul 2019 14:30:13 +0300 Subject: NLHR_PTR - smart pointers make better code --- plugins/PasteIt/src/PasteToWeb.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugins/PasteIt/src') 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& 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; -- cgit v1.2.3