tweaks: don't bother to free the content of 'extendsyntax' commands
Extending a syntax will be rather rare, so the amount of memory it takes up will be minimal. It's not worth the trouble to free this memory -- it only takes time. Plus: we don't bother to free the memory of a syntax that gets fully redefined either.master
parent
7f3ffe8544
commit
5e1f90d8fa
|
@ -584,7 +584,6 @@ void parse_one_include(char *file, syntaxtype *syntax)
|
|||
while (extra != NULL) {
|
||||
char *keyword = extra->data;
|
||||
char *ptr = parse_next_word(extra->data);
|
||||
augmentstruct *next = extra->next;
|
||||
|
||||
nanorc = extra->filename;
|
||||
lineno = extra->lineno;
|
||||
|
@ -592,16 +591,11 @@ void parse_one_include(char *file, syntaxtype *syntax)
|
|||
if (!parse_syntax_commands(keyword, ptr))
|
||||
rcfile_error(N_("Command \"%s\" not understood"), keyword);
|
||||
|
||||
free(extra->filename);
|
||||
free(extra->data);
|
||||
free(extra);
|
||||
|
||||
extra = next;
|
||||
extra = extra->next;
|
||||
}
|
||||
|
||||
free(syntax->filename);
|
||||
syntax->filename = NULL;
|
||||
syntax->augmentations = NULL;
|
||||
opensyntax = FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue