* (edit_read_syntax_rules): Fix memory corruption if key is redefined

This commit is contained in:
Andrew V. Samoilov 2003-03-03 08:55:11 +00:00
parent 6747ef213e
commit 0c03bd9dd3
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}