summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessbackend.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2025-06-11 09:53:52 +0200
committerUlf Hermann <ulf.hermann@qt.io>2025-06-14 09:38:39 +0000
commit9a7d06f0d4551ef393eab6da21ad162582dccda6 (patch)
treef03ca00c6dd2492e04534f79b08a253e90559c02 /src/network/access/qnetworkaccessbackend.cpp
parentf4e7eebd27c1fed7bbeb646b38ea020c97731466 (diff)
QNetworkAccessBackend: Do not leak wrapped upload byte device
The wrappedUploadByteDevice is obviously intended to be owned by QNetworkAccessBackend. It needs to be deleted when QNetworkAccessBackend is destroyed. Ideally we shouldn't use bare pointers at all here, but since we need to pick this back all the way to 6.5, a minimal fix is preferred. Amends commit bba0bdb35c2806bcdde8e89965e99b3d412b8d3a Change-Id: Icbe857ad02c23693c313d3fcb2d0ee068362e5b7 Pick-to: 6.10 6.9 6.8 6.5 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qnetworkaccessbackend.cpp')
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 7fc0b474bb5..7ba97447657 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -258,7 +258,10 @@ QNetworkAccessBackend::QNetworkAccessBackend(TargetTypes targetTypes, IOFeatures
/*!
Destructs the QNetworkAccessBackend base class.
*/
-QNetworkAccessBackend::~QNetworkAccessBackend() { }
+QNetworkAccessBackend::~QNetworkAccessBackend()
+{
+ delete d_func()->wrappedUploadByteDevice;
+}
/*!
Returns the security related features that the backend claims to