From 2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 5 Jul 2003 23:57:24 +0000 Subject: Fix mem leaks and a conditional. 2003-07-06 Christian Persch * lib/widgets/ephy-node-view.c: (ephy_node_view_button_press_cb), (ephy_node_view_sort_func): * src/bookmarks/ephy-topics-selector.c: (topic_clicked), (topic_key_pressed): Fix mem leaks and a conditional. --- lib/widgets/ephy-node-view.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c index aad45f5b3..3ec8867db 100644 --- a/lib/widgets/ephy-node-view.c +++ b/lib/widgets/ephy-node-view.c @@ -435,7 +435,7 @@ ephy_node_view_button_press_cb (GtkTreeView *treeview, GdkEventButton *event, EphyNodeView *view) { - GtkTreePath *path; + GtkTreePath *path = NULL; GtkTreeSelection *selection; gboolean result = FALSE; @@ -464,6 +464,7 @@ ephy_node_view_button_press_cb (GtkTreeView *treeview, target_view = view; g_signal_emit (G_OBJECT (view), ephy_node_view_signals[SHOW_POPUP], 0); target_view = NULL; + gtk_tree_path_free (path); } } @@ -661,9 +662,10 @@ ephy_node_view_sort_func (GtkTreeModel *model, switch (G_TYPE_FUNDAMENTAL (type)) { case G_TYPE_STRING: + /* FIXME: this is horribly inefficient */ stra = g_utf8_casefold (g_value_get_string (&a_value), -1); strb = g_utf8_casefold (g_value_get_string (&b_value), -1); - g_return_val_if_fail (stra != NULL || strb != NULL, 0); + g_return_val_if_fail (stra != NULL && strb != NULL, 0); retval = g_utf8_collate (stra, strb); g_free (stra); g_free (strb); -- cgit v1.2.3