Fix some memory leaks

This commit is contained in:
heckflosse
2017-06-07 21:32:28 +02:00
parent 5e22addc54
commit 5e5affa585
2 changed files with 8 additions and 0 deletions

View File

@@ -293,6 +293,12 @@ public:
cmsCloseProfile(p.second); cmsCloseProfile(p.second);
} }
} }
if(srgb) {
cmsCloseProfile(srgb);
}
if(xyz) {
cmsCloseProfile(xyz);
}
} }
void init(const Glib::ustring& usrICCDir, const Glib::ustring& rtICCDir, bool loadAll) void init(const Glib::ustring& usrICCDir, const Glib::ustring& rtICCDir, bool loadAll)

View File

@@ -248,6 +248,8 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath
if (!fileFound && (level > 0 || displayLevel0)) { if (!fileFound && (level > 0 || displayLevel0)) {
// no files found in this level, we delete the subdirectory entry // no files found in this level, we delete the subdirectory entry
folders.pop_back(); folders.pop_back();
delete entries.back();
entries.pop_back(); entries.pop_back();
} }