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/WebView/src/webview_getdata.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'protocols/WebView/src') diff --git a/protocols/WebView/src/webview_getdata.cpp b/protocols/WebView/src/webview_getdata.cpp index 155f1be6c9..ab21c3f3ce 100644 --- a/protocols/WebView/src/webview_getdata.cpp +++ b/protocols/WebView/src/webview_getdata.cpp @@ -134,7 +134,7 @@ void GetData(void *param) db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Updating...")); g_plugin.setWord(hContact, "Status", ID_STATUS_DND); // download - NETLIBHTTPREQUEST *nlhrReply = Netlib_HttpTransaction(hNetlibUser, &nlhr); + NLHR_PTR nlhrReply(Netlib_HttpTransaction(hNetlibUser, &nlhr)); if (nlhrReply) { if (nlhrReply->resultCode < 200 || nlhrReply->resultCode >= 300) { g_plugin.setWord(hContact, "Status", ID_STATUS_AWAY); @@ -169,8 +169,6 @@ void GetData(void *param) else if (nlhrReply) DownloadSuccess = 1; - Netlib_FreeHttpRequest(nlhrReply); - if (DownloadSuccess) SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Download successful; about to process data...")); -- cgit v1.2.3