GUI: Fix two leaks in predictive dialog
This commit is contained in:
parent
9d4216e158
commit
bf5208dd3d
2 changed files with 2 additions and 0 deletions
|
@ -981,6 +981,7 @@ void PredictiveDialog::loadAllDictionary(Dict &dict) {
|
|||
Common::File *inFile = new Common::File();
|
||||
if (!inFile->open(ConfMan.get(dict.nameDict))) {
|
||||
warning("Predictive Dialog: cannot read file: %s", dict.defaultFilename.c_str());
|
||||
delete inFile;
|
||||
return;
|
||||
}
|
||||
loadDictionary(inFile, dict);
|
||||
|
|
|
@ -85,6 +85,7 @@ private:
|
|||
struct Dict {
|
||||
Dict() : dictLine(nullptr), dictText(nullptr), dictActLine(nullptr),
|
||||
dictLineCount(0), dictTextSize(0) {}
|
||||
~Dict() { free(dictText); }
|
||||
char **dictLine;
|
||||
char *dictText;
|
||||
char *dictActLine; // using only for united dict...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue