mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Free aliases on cmd_init
This commit is contained in:
parent
7344d3b898
commit
d668d15081
@ -971,6 +971,7 @@ cmd_init(void)
|
||||
g_string_free(ac_alias, TRUE);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
prefs_free_aliases(aliases);
|
||||
|
||||
prefs_ac = autocomplete_new();
|
||||
autocomplete_add(prefs_ac, "ui");
|
||||
|
@ -348,11 +348,15 @@ prefs_get_aliases(void)
|
||||
char *name = keys[i];
|
||||
char *value = g_key_file_get_string(prefs, PREF_GROUP_ALIAS, name, NULL);
|
||||
|
||||
ProfAlias *alias = malloc(sizeof(struct prof_alias_t));
|
||||
alias->name = strdup(name);
|
||||
alias->value = strdup(value);
|
||||
if (value != NULL) {
|
||||
ProfAlias *alias = malloc(sizeof(struct prof_alias_t));
|
||||
alias->name = strdup(name);
|
||||
alias->value = strdup(value);
|
||||
|
||||
result = g_list_insert_sorted(result, alias, (GCompareFunc)_alias_cmp);
|
||||
free(value);
|
||||
|
||||
result = g_list_insert_sorted(result, alias, (GCompareFunc)_alias_cmp);
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(keys);
|
||||
|
Loading…
Reference in New Issue
Block a user