summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-01 19:24:22 +0000
committerDavid Robillard <d@drobilla.net>2010-02-01 19:24:22 +0000
commit6e8877ee110b774caef800adbe35b21338b3372f (patch)
tree0d363e811d64da8aa8368c37830a562b1fe6e70e /src/gui
parentfeb7439d70871aa9663e7c4218671a3c26717fbb (diff)
downloadingen-6e8877ee110b774caef800adbe35b21338b3372f.tar.gz
ingen-6e8877ee110b774caef800adbe35b21338b3372f.tar.bz2
ingen-6e8877ee110b774caef800adbe35b21338b3372f.zip
Fix leaks and an iterator error found by cppcheck.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2399 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/LoadPatchWindow.cpp4
-rw-r--r--src/gui/LoadSubpatchWindow.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index 86e0d448..cb3aaf06 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -72,8 +72,10 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno
// Add global examples directory to "shortcut folders" (bookmarks)
const string examples_dir = Shared::data_file_path("patches");
DIR* d = opendir(examples_dir.c_str());
- if (d != NULL)
+ if (d != NULL) {
add_shortcut_folder(examples_dir);
+ closedir(d);
+ }
}
diff --git a/src/gui/LoadSubpatchWindow.cpp b/src/gui/LoadSubpatchWindow.cpp
index e580fa49..ef56a945 100644
--- a/src/gui/LoadSubpatchWindow.cpp
+++ b/src/gui/LoadSubpatchWindow.cpp
@@ -70,8 +70,10 @@ LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefP
// Add global examples directory to "shortcut folders" (bookmarks)
const string examples_dir = Shared::data_file_path("patches");
DIR* d = opendir(examples_dir.c_str());
- if (d != NULL)
+ if (d != NULL) {
add_shortcut_folder(examples_dir);
+ closedir(d);
+ }
}