projects
/
projects
/
chimara
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some memory leakage
[projects/chimara/chimara.git]
/
libchimara
/
window.c
diff --git
a/libchimara/window.c
b/libchimara/window.c
index b4d8897e1e738a8a3146ce91222cf08e5e958f81..5a194f4572bfc3fc62a0a7aaaa4854737f6d0209 100644
(file)
--- a/
libchimara/window.c
+++ b/
libchimara/window.c
@@
-35,6
+35,8
@@
window_new_common(glui32 rock)
win->history = NULL;
win->echo_line_input = TRUE;
win->echo_current_line_input = TRUE;
win->history = NULL;
win->echo_line_input = TRUE;
win->echo_current_line_input = TRUE;
+ win->extra_line_terminators = NULL;
+ win->current_extra_line_terminators = NULL;
/* Initialise the buffer */
win->buffer = g_string_sized_new(1024);
/* Initialise the buffer */
win->buffer = g_string_sized_new(1024);
@@
-65,6
+67,8
@@
window_close_common(winid_t win, gboolean destroy_node)
g_list_foreach(win->history, (GFunc)g_free, NULL);
g_list_free(win->history);
g_list_foreach(win->history, (GFunc)g_free, NULL);
g_list_free(win->history);
+ g_slist_free(win->extra_line_terminators);
+ g_slist_free(win->current_extra_line_terminators);
g_string_free(win->buffer, TRUE);
g_hash_table_destroy(win->hyperlinks);
g_string_free(win->buffer, TRUE);
g_hash_table_destroy(win->hyperlinks);
@@
-198,8
+202,8
@@
glk_window_get_sibling(winid_t win)
if(G_NODE_IS_ROOT(win->window_node))
return NULL;
if(win->window_node->next)
if(G_NODE_IS_ROOT(win->window_node))
return NULL;
if(win->window_node->next)
- return (winid_t)win->window_node->next;
- return (winid_t)win->window_node->prev;
+ return (winid_t)win->window_node->next
->data
;
+ return (winid_t)win->window_node->prev
->data
;
}
/**
}
/**