fix(radio): memory leak in ModelMap::renameLabel (#4675)
This commit is contained in:
@@ -685,6 +685,7 @@ bool ModelMap::renameLabel(const std::string &from, std::string to,
|
|||||||
if(curlen + csvto.size() - csvfrom.size() > LABELS_LENGTH - 1) {
|
if(curlen + csvto.size() - csvfrom.size() > LABELS_LENGTH - 1) {
|
||||||
TRACE("Labels: Rename Error! Labels too long on %s", model->modelName);
|
TRACE("Labels: Rename Error! Labels too long on %s", model->modelName);
|
||||||
if (progress != nullptr) progress("", 100); // Kill progress dialog
|
if (progress != nullptr) progress("", 100); // Kill progress dialog
|
||||||
|
free(modeldata);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user