mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* (edit_read_syntax_rules): Fix memory corruption if key is redefined
This commit is contained in:
parent
6747ef213e
commit
0c03bd9dd3
@ -808,10 +808,10 @@ edit_read_syntax_rules (WEdit *edit, FILE *f, char **args)
|
||||
break_a;
|
||||
if ((t = g_tree_lookup (defines, key))){
|
||||
g_free (t);
|
||||
t = g_strdup (value);
|
||||
} else {
|
||||
g_tree_insert (defines, g_strdup (key), g_strdup (value));
|
||||
key = g_strdup (key);
|
||||
}
|
||||
g_tree_insert (defines, key, g_strdup (value));
|
||||
} else { /* anything else is an error */
|
||||
break_a;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user