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

List:       kde-commits
Subject:    extragear/graphics/kphotoalbum/ImportExport
From:       Laurent Montel <montel () kde ! org>
Date:       2009-04-10 7:08:49
Message-ID: 1239347329.857025.3618.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 951760 by mlaurent:

Fix mem leak


 M  +5 -2      KimFileReader.cpp  


--- trunk/extragear/graphics/kphotoalbum/ImportExport/KimFileReader.cpp \
#951759:951760 @@ -17,14 +17,17 @@
     _zip = new KZip( fileName );
     if ( !_zip->open( QIODevice::ReadOnly ) ) {
         KMessageBox::error( 0, i18n("Unable to open '%1' for reading.", fileName ), \
                i18n("Error Importing Data") );
-        _zip =0;
+        delete _zip;
+	_zip = 0;
         return false;
     }
 
     _dir = _zip->directory();
     if ( _dir == 0 ) {
         KMessageBox::error( 0, i18n( "Error reading directory contents of file %1; \
                it is likely that the file is broken." , fileName ) );
-        return false;
+        delete _zip;
+	_zip = 0;
+	return false;
     }
 
 


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

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