Skip to content
Browse files

Fix memory leak in MetaIOTagLib::getTrackLength(const QString &filename)

  • Loading branch information...
1 parent 7d4b285 commit e8aef6a91a00d57456ccaf5427f9e749857252ca @stuartm stuartm committed May 24, 2012
View
4 mythplugins/mythmusic/mythmusic/metaioid3.cpp
@@ -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()));
@@ -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()));
}
View
2 mythplugins/mythmusic/mythmusic/metaiotaglib.cpp
@@ -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.
Something went wrong with that request. Please try again.