1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 15:26:37 +02:00

Fix 14 memory leaks (in core, gui, irc, jabber, logger, script plugins)

This commit is contained in:
Sebastien Helleu
2009-02-04 14:12:46 +01:00
parent aeb11f7e05
commit 7cc562be45
11 changed files with 33 additions and 12 deletions
+2
View File
@@ -293,6 +293,8 @@ gui_bar_window_content_free (struct t_gui_bar_window *bar_window)
free (bar_window->items_content[i]);
free (bar_window->items_refresh_needed[i]);
}
free (bar_window->items_subcount);
bar_window->items_subcount = NULL;
free (bar_window->items_content);
bar_window->items_content = NULL;
free (bar_window->items_refresh_needed);
+1
View File
@@ -700,6 +700,7 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
&(bar->items_subcount[i]));
}
}
string_free_exploded (tmp_array);
}
}
+2
View File
@@ -1248,6 +1248,8 @@ gui_buffer_close (struct t_gui_buffer *buffer)
gui_nicklist_remove_group (buffer, buffer->nicklist_root);
if (buffer->highlight_words)
free (buffer->highlight_words);
if (buffer->highlight_tags)
free (buffer->highlight_tags);
if (buffer->highlight_tags_array)
string_free_exploded (buffer->highlight_tags_array);
gui_keyboard_free_all (&buffer->keys, &buffer->last_key);
+1 -4
View File
@@ -743,13 +743,9 @@ gui_chat_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line)
void
gui_chat_line_free_all (struct t_gui_buffer *buffer)
{
struct t_gui_line *next_line;
while (buffer->lines)
{
next_line = buffer->lines->next_line;
gui_chat_line_free (buffer, buffer->lines);
buffer->lines = next_line;
}
}
@@ -1119,6 +1115,7 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date,
free (new_msg);
new_msg = NULL;
}
free (modifier_data);
}
}
+6
View File
@@ -423,6 +423,12 @@ gui_window_free (struct t_gui_window *window)
gui_bar_window_free (window->bar_windows, window);
}
/* free other data */
if (window->layout_plugin_name)
free (window->layout_plugin_name);
if (window->layout_buffer_name)
free (window->layout_buffer_name);
/* remove window from windows list */
if (window->prev_window)
(window->prev_window)->next_window = window->next_window;