Fix issues found by AddressSanitizer

Fix memcpy overlap in TIFF reader.
Fix memory leaks of SpotRows in control spot panel.
Fix memory leaks of SpotRows in locallab.
Fix memory leak of Glib::ThreadPool in file browser entry.
Fix memory leak of Glib::ThreadPool in thumbnail image updater.
This commit is contained in:
Lawrence Lee
2023-11-11 16:56:34 -08:00
parent f93c3ddf94
commit c5bb1f093e
6 changed files with 259 additions and 250 deletions

View File

@@ -21,6 +21,8 @@
#ifndef _CONTROLSPOTPANEL_H_
#define _CONTROLSPOTPANEL_H_
#include <memory>
#include "../rtengine/coord.h"
#include "editcallbacks.h"
#include "threadutils.h"
@@ -141,7 +143,7 @@ public:
* @param index The spot index to get params
* @return A SpotRow structure containing params of associated spot
*/
SpotRow* getSpot(const int index);
std::unique_ptr<SpotRow> getSpot(const int index);
/**
* Getter of spots number
*
@@ -187,7 +189,7 @@ public:
*
* @param newSpot A SpotRow structure containing new spot params
*/
void addControlSpot(SpotRow* newSpot);
void addControlSpot(const SpotRow &newSpot);
// Control spot delete function
/**