Skip to content

Commit

Permalink
Fix memory leak in MetaIOTagLib::getTrackLength(const QString &filename)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartm committed May 24, 2012
1 parent 7d4b285 commit e8aef6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythplugins/mythmusic/mythmusic/metaioid3.cpp
Expand Up @@ -201,7 +201,7 @@ bool MetaIOID3::write(const Metadata* mdata)
{
tpe4frame = new TextIdentificationFrame(TagLib::ByteVector("TPE4"),
TagLib::String::UTF8);
tag->addFrame(tpe4frame);
tag->addFrame(tpe4frame);
}
tpe4frame->setText(QStringToTString(mdata->CompilationArtist()));

Expand All @@ -215,7 +215,7 @@ bool MetaIOID3::write(const Metadata* mdata)
{
tpe2frame = new TextIdentificationFrame(TagLib::ByteVector("TPE2"),
TagLib::String::UTF8);
tag->addFrame(tpe2frame);
tag->addFrame(tpe2frame);
}
tpe2frame->setText(QStringToTString(mdata->CompilationArtist()));
}
Expand Down
2 changes: 2 additions & 0 deletions mythplugins/mythmusic/mythmusic/metaiotaglib.cpp
Expand Up @@ -122,6 +122,8 @@ int MetaIOTagLib::getTrackLength(const QString &filename)
LOG(VB_GENERAL, LOG_ERR,
QString("MetaIOTagLib: Failed to read length "
"from '%1'. It may be corrupt.").arg(filename));

delete file;

return milliseconds;
}

0 comments on commit e8aef6a

Please sign in to comment.