Add WiFiManagerParameter destructor to free new'd _value, it was allocated but never free'd

This commit is contained in:
Christopher Liebman
2017-12-09 06:24:15 -08:00
parent 89af31245b
commit a5ff5cb9e4
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -44,6 +44,12 @@ void WiFiManagerParameter::init(const char *id, const char *placeholder, const c
_customHTML = custom;
}
WiFiManagerParameter::~WiFiManagerParameter() {
if (_value != NULL) {
delete _value;
}
}
const char* WiFiManagerParameter::getValue() {
return _value;
}