From 0dd7ca27afa69591ac4c5aa26710ace48c3ebe7e Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 28 Mar 2016 11:46:01 +0200 Subject: [PATCH] Fix memory leak in Kicker Found by coverity REVIEW: 127512 --- fileentry.cpp | 7 ++++++- fileentry.h | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fileentry.cpp b/fileentry.cpp index 9c978fab9..33aba08b7 100644 --- a/fileentry.cpp +++ b/fileentry.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 201 by Eike Hein * + * Copyright (C) 2015 by Eike Hein * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -32,6 +32,11 @@ FileEntry::FileEntry(AbstractModel *owner, const QUrl &url) : AbstractEntry(owne } } +FileEntry::~FileEntry() +{ + delete m_fileItem; +} + bool FileEntry::isValid() const { return m_fileItem && (m_fileItem->isFile() || m_fileItem->isDir()); diff --git a/fileentry.h b/fileentry.h index 4c67e794d..da3f984b7 100644 --- a/fileentry.h +++ b/fileentry.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 201 by Eike Hein * + * Copyright (C) 2015 by Eike Hein * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -28,6 +28,7 @@ class FileEntry : public AbstractEntry { public: explicit FileEntry(AbstractModel *owner, const QUrl &url); + ~FileEntry(); EntryType type() const { return RunnableType; }