summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/zipinstaller.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-03-09 19:34:45 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-03-09 19:34:45 +0100
commite50066718c98308ff11f086e71d2546f850cf94a (patch)
treedd2ea4a528a8390de9a6f2449269249ba706f09a /rbutil/rbutilqt/base/zipinstaller.cpp
parentef9eea7fd2be10b3e437d5944cfaf0fa001fc917 (diff)
downloadrockbox-e50066718c98308ff11f086e71d2546f850cf94a.tar.gz
rockbox-e50066718c98308ff11f086e71d2546f850cf94a.tar.bz2
rockbox-e50066718c98308ff11f086e71d2546f850cf94a.zip
Don't leak HttpGet objects in ZipInstaller.
When creating a new HttpGet object schedule any old one for deletion instead of dropping its reference and relying on Qt to clean it up once the parent object is removed. Change-Id: I66f2a6f01c6b6ad3a0dce0eb4fd3eacfaf7e733d
Diffstat (limited to 'rbutil/rbutilqt/base/zipinstaller.cpp')
-rw-r--r--rbutil/rbutilqt/base/zipinstaller.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/zipinstaller.cpp b/rbutil/rbutilqt/base/zipinstaller.cpp
index c41304e3b4..39a41564c9 100644
--- a/rbutil/rbutilqt/base/zipinstaller.cpp
+++ b/rbutil/rbutilqt/base/zipinstaller.cpp
@@ -25,6 +25,7 @@ ZipInstaller::ZipInstaller(QObject* parent): QObject(parent)
{
m_unzip = true;
m_usecache = false;
+ getter = 0;
}
@@ -87,6 +88,7 @@ void ZipInstaller::installStart()
m_file = downloadFile->fileName();
downloadFile->close();
// get the real file.
+ if(getter != 0) getter->deleteLater();
getter = new HttpGet(this);
if(m_usecache) {
getter->setCache(true);