Skip to content

Commit

Permalink
Fix heap error and mem leak
Browse files Browse the repository at this point in the history
  • Loading branch information
peteGSX committed Dec 25, 2024
1 parent 0c1204a commit 8a3c86a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions AtFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ void AtFinder::cleanUp() {
free(AtFinder::_text);
AtFinder::_text = nullptr;
AtFinder::_callback = nullptr;
AtFinder::_logger = nullptr;
}

void AtFinder::setLogger(Logger *logger) { _logger = logger; }
3 changes: 2 additions & 1 deletion Configurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* along with this code. If not, see <https://www.gnu.org/licenses/>.
*/

#include "AtFinder.h"
#include "Configurator.h"
#include "AtFinder.h"
#include "Version.h"

Configurator::Configurator(Stream *consoleStream, Stream *commandStationStream, LogLevel logLevel)
Expand Down Expand Up @@ -63,6 +63,7 @@ Configurator::~Configurator() {
delete _controller;
delete _logger;
delete _displayManager;
delete _inputManager;
delete _screenManager;
_controller = nullptr;
_logger = nullptr;
Expand Down

0 comments on commit 8a3c86a

Please sign in to comment.