Fix memory leak in Kicker

Found by coverity

REVIEW: 127512
wilder-5.17
Albert Astals Cid 10 years ago
parent 5f45f75cd5
commit 0dd7ca27af
  1. 7
      fileentry.cpp
  2. 3
      fileentry.h

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 201 by Eike Hein <hein@kde.org> *
* Copyright (C) 2015 by Eike Hein <hein@kde.org> *
* *
* 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());

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 201 by Eike Hein <hein@kde.org> *
* Copyright (C) 2015 by Eike Hein <hein@kde.org> *
* *
* 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; }

Loading…
Cancel
Save