1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge branch 'master' into osx-functional

This commit is contained in:
James Booth 2016-03-07 18:41:48 +00:00
commit f8d32864f0
4 changed files with 28 additions and 10 deletions

View File

@ -12,9 +12,7 @@
otrl_init
Memcheck:Leak
...
fun:_otr_init
fun:_init
fun:prof_run
fun:otrl_init
...
}

View File

@ -67,10 +67,12 @@ autocompleters_complete(const char * const input)
while (curr) {
result = autocomplete_param_with_ac(input, curr->data, g_hash_table_lookup(autocompleters, curr->data), TRUE);
if (result) {
g_list_free(keys);
return result;
}
curr = g_list_next(curr);
}
g_list_free(keys);
return NULL;
}
@ -84,6 +86,8 @@ autocompleters_reset(void)
autocomplete_reset(curr->data);
curr = g_list_next(curr);
}
g_list_free(acs);
}
void autocompleters_destroy(void)

View File

@ -419,27 +419,42 @@ win_free(ProfWin* window)
}
free(window->layout);
if (window->type == WIN_CHAT) {
switch (window->type) {
case WIN_CHAT:
{
ProfChatWin *chatwin = (ProfChatWin*)window;
free(chatwin->barejid);
free(chatwin->resource_override);
chat_state_free(chatwin->state);
break;
}
if (window->type == WIN_MUC) {
case WIN_MUC:
{
ProfMucWin *mucwin = (ProfMucWin*)window;
free(mucwin->roomjid);
break;
}
if (window->type == WIN_MUC_CONFIG) {
case WIN_MUC_CONFIG:
{
ProfMucConfWin *mucconf = (ProfMucConfWin*)window;
free(mucconf->roomjid);
form_destroy(mucconf->form);
break;
}
if (window->type == WIN_PRIVATE) {
case WIN_PRIVATE:
{
ProfPrivateWin *privatewin = (ProfPrivateWin*)window;
free(privatewin->fulljid);
break;
}
case WIN_PLUGIN:
{
ProfPluginWin *pluginwin = (ProfPluginWin*)window;
free(pluginwin->tag);
break;
}
default:
break;
}
free(window);

View File

@ -212,6 +212,7 @@ wins_get_plugin(const char *const tag)
if (window->type == WIN_PLUGIN) {
ProfPluginWin *pluginwin = (ProfPluginWin*)window;
if (g_strcmp0(pluginwin->tag, tag) == 0) {
g_list_free(values);
return pluginwin;
}
}