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/Omegle/src/communication.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'protocols/Omegle/src') diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index a7b6c7960b..66f1205f12 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -79,7 +79,7 @@ http::response Omegle_client::flap(const int request_type, std::string *post_dat parent->debugLogA("@@@@@ Sending request to '%s'", nlhr.szUrl); // Send the request - NETLIBHTTPREQUEST *pnlhr = Netlib_HttpTransaction(handle_, &nlhr); + NLHR_PTR pnlhr(Netlib_HttpTransaction(handle_, &nlhr)); mir_free(nlhr.headers); @@ -113,8 +113,6 @@ http::response Omegle_client::flap(const int request_type, std::string *post_dat } parent->debugLogA("&&&&& Got response: %s", resp.data.c_str()); - - Netlib_FreeHttpRequest(pnlhr); } else { parent->debugLogA("!!!!! No response from server (time-out)"); -- cgit v1.2.3