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

@@ -27,9 +27,6 @@ CameraConst::CameraConst()
white_max = 0;
}
CameraConst::~CameraConst()
{
}
bool
CameraConst::parseApertureScaling(CameraConst *cc, void *ji_)
@@ -709,6 +706,14 @@ CameraConstantsStore::CameraConstantsStore()
{
}
CameraConstantsStore::~CameraConstantsStore()
{
for (auto &p : mCameraConstants) {
delete p.second;
}
}
void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSettingsDir)
{
parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json"));