[haiku-commits] haiku: hrev43599 - src/apps/processcontroller

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 2 Jan 2012 20:58:37 +0100 (CET)

hrev43599 adds 1 changeset to branch 'master'
old head: 9e4224613c08b1bd53f1898357bcef938a788a20
new head: 93f68d97bf912e963e4390a606d1baaf234b57a5

----------------------------------------------------------------------------

93f68d9: ProcessController: fix a small resource leak
  
  fSettingsFile wasn't deleted in the destructor.  CID 1414.

                                [ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev43599
Commit:      93f68d97bf912e963e4390a606d1baaf234b57a5
URL:         http://cgit.haiku-os.org/haiku/commit/?id=93f68d9
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Mon Jan  2 19:55:55 2012 UTC

----------------------------------------------------------------------------

1 files changed, 2 insertions(+), 1 deletions(-)
src/apps/processcontroller/Preferences.cpp |    3 ++-

----------------------------------------------------------------------------

diff --git a/src/apps/processcontroller/Preferences.cpp 
b/src/apps/processcontroller/Preferences.cpp
index e7ca2c4..15b49d9 100644
--- a/src/apps/processcontroller/Preferences.cpp
+++ b/src/apps/processcontroller/Preferences.cpp
@@ -91,7 +91,7 @@ Preferences::~Preferences()
                BFile file;
                status_t set = B_ERROR;
                if (fSettingsFile)
-                       file.SetTo (fSettingsFile, B_READ_WRITE | B_CREATE_FILE 
| B_ERASE_FILE);
+                       file.SetTo(fSettingsFile, B_READ_WRITE | B_CREATE_FILE 
| B_ERASE_FILE);
                else {
                        BPath prefpath;
                        if (find_directory(B_USER_SETTINGS_DIRECTORY, 
&prefpath, true) == B_OK) {
@@ -121,6 +121,7 @@ Preferences::~Preferences()
                        alert->Go();
                }
        }
+       delete fSettingsFile;
        free(fName);
        free(fSignature);
 }


Other related posts:

  • » [haiku-commits] haiku: hrev43599 - src/apps/processcontroller - stpere