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 otrl_init
Memcheck:Leak Memcheck:Leak
... ...
fun:_otr_init fun:otrl_init
fun:_init
fun:prof_run
... ...
} }

View File

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

View File

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

View File

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