A few more minor fixes geared towards lgtm.com alerts (#6127)
* Remove unfilled formatting placeholders in KLT parser. * Fix presumably unintentionally missing reference on PlanatPtr and ChunkyPtr call operators. * Fix catching pointer and make use-after-free of workimg easier to spot. Make sure all of our thrown exceptions derive from std::exception and then catch by reference instead of by pointer. * Fix mismatch between array form new and non-array form delete. * Simplify memory management of embedded color profiles by unifying allocation to use operator new.
This commit is contained in:
@@ -1652,8 +1652,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
|
||||
// Computing the internal image for analysis, i.e. conversion from WCS->Output profile
|
||||
delete workimg;
|
||||
workimg = nullptr;
|
||||
|
||||
workimg = ipf.lab2rgb(nprevl, 0, 0, pW, pH, params->icm);
|
||||
} catch (char * str) {
|
||||
} catch (std::exception&) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1728,6 +1730,7 @@ void ImProcCoordinator::freeAll()
|
||||
}
|
||||
|
||||
delete workimg;
|
||||
workimg = nullptr;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user