mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kutils: plug KArchive memory leaks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4c7a71e55a
commit
e4c8f00e14
1 changed files with 3 additions and 0 deletions
|
@ -511,6 +511,7 @@ bool KArchive::add(const QStringList &paths, const QByteArray &strip, const QByt
|
|||
if (!readarchive) {
|
||||
d->m_error = i18n("Could not open archive: %1", d->m_path);
|
||||
kDebug() << d->m_error;
|
||||
KArchivePrivate::closeWrite(writearchive);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -739,6 +740,7 @@ bool KArchive::remove(const QStringList &paths) const
|
|||
if (!writearchive) {
|
||||
d->m_error = i18n("Could not open temporary archive: %1", tmpfile);
|
||||
kDebug() << d->m_error;
|
||||
KArchivePrivate::closeRead(readarchive);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -867,6 +869,7 @@ bool KArchive::extract(const QStringList &paths, const QString &destination, con
|
|||
if (!writearchive) {
|
||||
d->m_error = i18n("Could not open destination: %1", destination);
|
||||
kDebug() << d->m_error;
|
||||
KArchivePrivate::closeRead(readarchive);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue