[Uml-devel] KDE/kdesdk/umbrello/umbrello

Laurent Montel montel at kde.org
Sun Aug 3 10:01:34 UTC 2008


SVN commit 841416 by mlaurent:

Fix mem leak


 M  +3 -0      umldoc.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp #841415:841416
@@ -570,6 +570,7 @@
         if (archive->open(QIODevice::WriteOnly) == false)
         {
             KMessageBox::error(0, i18n("There was a problem saving file: %1", d.path()), i18n("Save Error"));
+            delete archive;
             return false;
         }
 
@@ -579,6 +580,7 @@
         tmp_xmi_file.setAutoRemove(false);
         if ( !tmp_xmi_file.open() ) {
             KMessageBox::error(0, i18n("There was a problem saving file: %1", d.path()), i18n("Save Error"));
+            delete archive;
             return false;
         }
         saveToXMI(tmp_xmi_file); // save XMI to this file...
@@ -595,6 +597,7 @@
 
         if (!archive->close()) {
             KMessageBox::error(0, i18n("There was a problem saving file: %1", d.path()), i18n("Save Error"));
+            delete archive;
             return false;
         }
         // now the xmi file was added to the archive, so we can delete it




More information about the umbrello-devel mailing list