summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base
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
parentef9eea7fd2be10b3e437d5944cfaf0fa001fc917 (diff)
downloadrockbox-e50066718c98308ff11f086e71d2546f850cf94a.tar.gz
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')
-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)
25{ 25{
26 m_unzip = true; 26 m_unzip = true;
27 m_usecache = false; 27 m_usecache = false;
28 getter = 0;
28} 29}
29 30
30 31
@@ -87,6 +88,7 @@ void ZipInstaller::installStart()
87 m_file = downloadFile->fileName(); 88 m_file = downloadFile->fileName();
88 downloadFile->close(); 89 downloadFile->close();
89 // get the real file. 90 // get the real file.
91 if(getter != 0) getter->deleteLater();
90 getter = new HttpGet(this); 92 getter = new HttpGet(this);
91 if(m_usecache) { 93 if(m_usecache) {
92 getter->setCache(true); 94 getter->setCache(true);