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 --- protocols/SkypeWeb/src/request_queue.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/request_queue.cpp b/protocols/SkypeWeb/src/request_queue.cpp index 83945ae5fa..e17b2ba9a6 100644 --- a/protocols/SkypeWeb/src/request_queue.cpp +++ b/protocols/SkypeWeb/src/request_queue.cpp @@ -75,10 +75,9 @@ void RequestQueue::Send(HttpRequest *request, HttpResponseCallback response, voi void RequestQueue::Execute(RequestQueueItem *item) { - NETLIBHTTPREQUEST *response = item->request->Send(nlu); + NLHR_PTR response(item->request->Send(nlu)); if (item->responseCallback != nullptr) item->responseCallback(response, item->arg); - Netlib_FreeHttpRequest(response); requests.remove(item); delete item; } -- cgit v1.2.3