Skip to content

Commit

Permalink
MythMusic: fix Coverity ID 1026169 Resource leak
Browse files Browse the repository at this point in the history
In EditMetadataCommon::scanForImages() image was not being deleted.
  • Loading branch information
Paul Harrison committed May 31, 2013
1 parent 024a44f commit 73a5a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythplugins/mythmusic/mythmusic/editmetadata.cpp
Expand Up @@ -278,12 +278,12 @@ void EditMetadataCommon::scanForImages(void)
for (int x = 0; x < files.size(); x++)
{
AlbumArtImage *image = new AlbumArtImage();
//image->id = 0;
image->filename = dir.absolutePath() + '/' + files.at(x);
image->embedded = false;
image->imageType = AlbumArtImages::guessImageType(image->filename);
image->description = "";
m_metadata->getAlbumArtImages()->addImage(image);
delete image;
}

// scan the tracks tag for any images
Expand Down

0 comments on commit 73a5a95

Please sign in to comment.