aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--lib/widgets/ephy-node-view.c6
-rw-r--r--src/bookmarks/ephy-topics-selector.c4
3 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 664271280..43c125de6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2003-07-05 Christian Persch <chpe@cvs.gnome.org>
* src/prefs-dialog.c: (setup_font_menu), (set_homepage_entry):
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);
diff --git a/src/bookmarks/ephy-topics-selector.c b/src/bookmarks/ephy-topics-selector.c
index a43622cd5..9a2a72df5 100644
--- a/src/bookmarks/ephy-topics-selector.c
+++ b/src/bookmarks/ephy-topics-selector.c
@@ -307,7 +307,7 @@ topic_clicked (GtkTreeView *tree_view,
GdkEventButton *event,
EphyTopicsSelector *selector)
{
- GtkTreePath *path;
+ GtkTreePath *path = NULL;
if (event->window != gtk_tree_view_get_bin_window (tree_view))
return FALSE;
@@ -321,6 +321,7 @@ topic_clicked (GtkTreeView *tree_view,
gchar *path_str = gtk_tree_path_to_string (path);
topic_toggled (NULL, path_str, selector);
g_free(path_str);
+ gtk_tree_path_free (path);
}
return FALSE;
@@ -349,6 +350,7 @@ topic_key_pressed (GtkTreeView *tree_view,
path_str = gtk_tree_path_to_string (path);
topic_toggled (NULL, path_str, selector);
g_free(path_str);
+ gtk_tree_path_free (path);
}
return TRUE;