Skip to content

Commit 724bcc4

Browse files
Monteldfaure-kdab
authored andcommitted
Step2: fix test_ranges mem leak (KDSoap delete QBuffer but not the new QByteArray)
1 parent 93184d7 commit 724bcc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unittests/ranges/test_ranges.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class FileServerObject final : public QObject, public KDSoapServerObjectInterfac
3434
Q_ASSERT(!path.startsWith(".."));
3535
if (path == QLatin1String("/path/to/file_download.txt")) {
3636
contentType = "text/plain";
37-
return new QBuffer(new QByteArray(m_data)); // KDSoap will delete this
37+
return new QBuffer(&m_data); // KDSoap will delete this
3838
}
3939
return nullptr;
4040
}

0 commit comments

Comments
 (0)