Fixed various memory leaks as reported by AddressSanitizer

This commit is contained in:
Alberto Griggio
2017-06-07 10:36:28 +02:00
parent b3956a3fda
commit 2edd677d1a
10 changed files with 78 additions and 50 deletions

View File

@@ -276,6 +276,20 @@ public:
}
}
~Implementation()
{
for (auto &p : wProfiles) {
if (p.second) {
cmsCloseProfile(p.second);
}
}
for (auto &p : wProfilesGamma) {
if (p.second) {
cmsCloseProfile(p.second);
}
}
}
void init(const Glib::ustring& usrICCDir, const Glib::ustring& rtICCDir, bool loadAll)
{
// Reads all profiles from the given profiles dir