From 125a02c0e64748f0c41cb233b060a122870ca4e6 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Tue, 15 Dec 2020 23:47:35 +0100 Subject: [PATCH] Minor modifications --- src/app/CFGFileParser.cpp | 1 + src/app/CFGParameterValue.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/CFGFileParser.cpp b/src/app/CFGFileParser.cpp index e6ee7a6..24f78bb 100644 --- a/src/app/CFGFileParser.cpp +++ b/src/app/CFGFileParser.cpp @@ -16,6 +16,7 @@ void *CFGFileParser::parseFile() if(!_sdCardManager.isMounted()) return NULL; file = _sdCardManager.open(_resource); + //We check if the file name is not NULL :-) if(!file) { delete dictioRef; diff --git a/src/app/CFGParameterValue.cpp b/src/app/CFGParameterValue.cpp index c124106..706a0a3 100644 --- a/src/app/CFGParameterValue.cpp +++ b/src/app/CFGParameterValue.cpp @@ -46,7 +46,6 @@ CFGParameterValue::~CFGParameterValue() void CFGParameterValue::setValue(const char *value, bool isQuoted) { _quotedValue = isQuoted; - free(_value);_value = NULL; _value = (char *) malloc((strlen(value) * sizeof(char)) + 1); //+1 for the string terminating character strcpy(_value, value);