ProcessController: fix a small resource leak

fSettingsFile wasn't deleted in the destructor.  CID 1414.
This commit is contained in:
Philippe Saint-Pierre
2012-01-02 14:55:55 -05:00
parent 9e4224613c
commit 93f68d97bf
+2 -1
View File
@@ -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);
}