diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/ephy-node-filter.c | 12 |
2 files changed, 10 insertions, 9 deletions
@@ -1,5 +1,12 @@ 2004-01-25 Christian Persch <chpe@cvs.gnome.org> + * lib/ephy-node-filter.c: (ephy_node_filter_finalize), + (ephy_node_filter_new), (ephy_node_filter_add_expression): + + Fix mem leak. + +2004-01-25 Christian Persch <chpe@cvs.gnome.org> + * embed/ephy-history.c: (ephy_history_finalize): Fix mem leak. diff --git a/lib/ephy-node-filter.c b/lib/ephy-node-filter.c index 1625c6ecb..863ddc8eb 100644 --- a/lib/ephy-node-filter.c +++ b/lib/ephy-node-filter.c @@ -139,7 +139,7 @@ ephy_node_filter_finalize (GObject *object) ephy_node_filter_empty (filter); - g_ptr_array_free (filter->priv->levels, FALSE); + g_ptr_array_free (filter->priv->levels, TRUE); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -147,14 +147,7 @@ ephy_node_filter_finalize (GObject *object) EphyNodeFilter * ephy_node_filter_new (void) { - EphyNodeFilter *filter; - - filter = EPHY_NODE_FILTER (g_object_new (EPHY_TYPE_NODE_FILTER, - NULL)); - - g_return_val_if_fail (filter->priv != NULL, NULL); - - return filter; + return EPHY_NODE_FILTER (g_object_new (EPHY_TYPE_NODE_FILTER, NULL)); } void @@ -165,6 +158,7 @@ ephy_node_filter_add_expression (EphyNodeFilter *filter, while (level >= filter->priv->levels->len) g_ptr_array_add (filter->priv->levels, NULL); + /* FIXME bogosity! This only works because g_list_append (x, data) == x */ g_ptr_array_index (filter->priv->levels, level) = g_list_append (g_ptr_array_index (filter->priv->levels, level), exp); } |