summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-20 13:55:42 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-20 13:55:42 (GMT)
commit1315a7e85c45e94c74c1ae7d92b331c21bfe79f7 (patch)
tree51ce19948c53fae7c8f0a9a2dae5669a477ce151
parent67fbf535e50a0e92ff237f9ad23bf065821ba2a8 (diff)
parent29423dcc76970253fd5bca43d0abba4876b85b85 (diff)
downloadQt-1315a7e85c45e94c74c1ae7d92b331c21bfe79f7.zip
Qt-1315a7e85c45e94c74c1ae7d92b331c21bfe79f7.tar.gz
Qt-1315a7e85c45e94c74c1ae7d92b331c21bfe79f7.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
-rw-r--r--src/corelib/tools/qbytearray.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index d2fbf5a..4049925 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -538,7 +538,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
forever {
ulong alloc = len;
- d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + alloc))));
+ d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.take(), sizeof(QByteArray::Data) + alloc))));
if (!d) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
qWarning("qUncompress: could not allocate enough memory to uncompress data");
@@ -551,7 +551,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK:
if (len != alloc) {
- d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + len))));
+ d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.take(), sizeof(QByteArray::Data) + len))));
if (!d) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
qWarning("qUncompress: could not allocate enough memory to uncompress data");