aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
diff options
context:
space:
mode:
Diffstat (limited to 'backends/networking')
-rw-r--r--backends/networking/curl/curljsonrequest.cpp2
-rw-r--r--backends/networking/curl/curlrequest.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp
index 3c598d7f18..bc5de60f43 100644
--- a/backends/networking/curl/curljsonrequest.cpp
+++ b/backends/networking/curl/curljsonrequest.cpp
@@ -34,7 +34,7 @@ namespace Networking {
CurlJsonRequest::CurlJsonRequest(JsonCallback cb, Common::String url):
CurlRequest(0, url), _jsonCallback(cb), _contentsStream(DisposeAfterUse::YES) {}
-CurlJsonRequest::~CurlJsonRequest() {}
+CurlJsonRequest::~CurlJsonRequest() { delete _jsonCallback; }
char *CurlJsonRequest::getPreparedContents() {
//write one more byte in the end
diff --git a/backends/networking/curl/curlrequest.cpp b/backends/networking/curl/curlrequest.cpp
index a8eb425412..61af633f21 100644
--- a/backends/networking/curl/curlrequest.cpp
+++ b/backends/networking/curl/curlrequest.cpp
@@ -33,9 +33,7 @@ namespace Networking {
CurlRequest::CurlRequest(DataCallback cb, Common::String url):
Request(cb), _url(url), _stream(0), _headersList(0) {}
-CurlRequest::~CurlRequest() {
- if (_stream) delete _stream;
-}
+CurlRequest::~CurlRequest() { delete _stream; }
void CurlRequest::handle() {
if (!_stream) _stream = new NetworkReadStream(_url.c_str(), _headersList, _postFields);