aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-06 07:57:24 +0800
committerChristian Persch <chpe@src.gnome.org>2003-07-06 07:57:24 +0800
commit2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6 (patch)
tree31fbf72c011dd71ac02de27bb1b7f857effb2ca7 /lib
parentef8471f1c1829e864124d0025938ed1c8b8970c7 (diff)
downloadgsoc2013-epiphany-2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6.tar
gsoc2013-epiphany-2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6.tar.gz
gsoc2013-epiphany-2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6.tar.bz2
gsoc2013-epiphany-2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6.tar.lz
gsoc2013-epiphany-2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6.tar.xz
gsoc2013-epiphany-2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6.tar.zst
gsoc2013-epiphany-2ed547c52d8c9bde77dd0d95ddd6e32a9149b6d6.zip
Fix mem leaks and a conditional.
2003-07-06 Christian Persch <chpe@cvs.gnome.org> * 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.
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/ephy-node-view.c6
1 files changed, 4 insertions, 2 deletions
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);