[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src
From:       Alexandre Pereira de Oliveira <aoliveira () kdemail ! net>
Date:       2005-08-30 1:03:36
Message-ID: 1125363816.850742.16479.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 454826 by aoliveira:

another small memleak

 M  +4 -1      metabundle.cpp  


--- trunk/extragear/multimedia/amarok/src/metabundle.cpp #454825:454826
@@ -161,10 +161,11 @@
     const QString path = m_url.path();
     TagLib::FileRef fileref;
     TagLib::Tag *tag = 0;
+    TagLib::MPEG::File *mpeg = 0;
 
     if( AmarokConfig::recodeID3v1Tags() && path.endsWith( ".mp3", false ) )
     {
-        TagLib::MPEG::File *mpeg = new TagLib::MPEG::File( QFile::encodeName( path ), true, readStyle );
+        mpeg = new TagLib::MPEG::File( QFile::encodeName( path ), true, readStyle );
         fileref = TagLib::FileRef( mpeg );
 
         if( mpeg->isValid() )
@@ -198,6 +199,8 @@
         init( fileref.audioProperties() );
     }
 
+    delete mpeg;
+
     //FIXME disabled for beta4 as it's simpler to not got 100 bug reports
     //else if( KMimeType::findByUrl( m_url )->is( "audio" ) )
     //    init( KFileMetaInfo( m_url, QString::null, KFileMetaInfo::Everything ) );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic