mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added WIN_PLUGIN case to win_free()
This commit is contained in:
parent
f26da31f62
commit
355adb117c
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user