tst_QNetworkDiskCache: fix mem-leak
A caller of Q(Abstract)NetworkDiskCache::data() is supposed to delete the returned value, and this caller forgot. Do it now; better late than never. Amendsfeb1afc782
. Change-Id: I1b27663df9ad49e0203172265d224fdb6ec06646 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commitbad3b8f78b
) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
09cebbd128
commit
360e71d5be
@ -657,6 +657,7 @@ void tst_QNetworkDiskCache::streamVersion()
|
||||
QIODevice *dataDevice = cache.data(url);
|
||||
QVERIFY(dataDevice != 0);
|
||||
QByteArray cachedData = dataDevice->readAll();
|
||||
delete dataDevice;
|
||||
QCOMPARE(cachedData, data);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user