From 3b8a63a71347d58b12e72c59c1d36a189fdc0dfd Mon Sep 17 00:00:00 2001 From: "craig.p.drummond" Date: Fri, 15 Feb 2013 17:21:44 +0000 Subject: [PATCH] Some valgrind fixes --- devices/fsdevice.cpp | 4 ++++ http/httpserver.cpp | 1 + online/onlineservice.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/devices/fsdevice.cpp b/devices/fsdevice.cpp index a003c95ce..c75f039ab 100644 --- a/devices/fsdevice.cpp +++ b/devices/fsdevice.cpp @@ -85,8 +85,12 @@ void MusicScanner::scan(const QString &folder, const QString &cacheFile, bool re fixLibrary(lib); if (!stopRequested) { emit libraryUpdated(lib); + } else { + delete lib; } return; + } else { + delete lib; } } diff --git a/http/httpserver.cpp b/http/httpserver.cpp index 94d990ce1..77bac6823 100644 --- a/http/httpserver.cpp +++ b/http/httpserver.cpp @@ -75,6 +75,7 @@ bool HttpServer::setDetails(const QString &addr, quint16 port) if (thread) { thread->quit(); + thread->deleteLater(); thread=0; } diff --git a/online/onlineservice.cpp b/online/onlineservice.cpp index 8b556f7cd..a5d3eba35 100644 --- a/online/onlineservice.cpp +++ b/online/onlineservice.cpp @@ -50,6 +50,9 @@ OnlineMusicLoader::OnlineMusicLoader(const QUrl &src) void OnlineMusicLoader::run() { + if (library) { + delete library; + } library = new MusicLibraryItemRoot; if (!readFromCache()) { emit status(i18n("Dowloading"), 0);