aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-28 07:10:53 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-28 07:10:53 +0800
commit4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab (patch)
tree04eae367b1c153bb3a5ae91df088391818abd570
parent7ba6cdfb3fb4727ec14cbcb9927dded050dbcc15 (diff)
downloadgsoc2013-epiphany-4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab.tar
gsoc2013-epiphany-4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab.tar.gz
gsoc2013-epiphany-4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab.tar.bz2
gsoc2013-epiphany-4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab.tar.lz
gsoc2013-epiphany-4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab.tar.xz
gsoc2013-epiphany-4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab.tar.zst
gsoc2013-epiphany-4ddb9e1f94a1c75804bf699f5cee9cbe0d45ecab.zip
Fix mem leaks.
2003-06-28 Christian Persch <chpe@cvs.gnome.org> * src/ephy-favorites-menu.c: (ephy_favorites_menu_rebuild): * embed/find-dialog.c: (find_get_info): Fix mem leaks.
-rwxr-xr-xembed/find-dialog.c12
-rw-r--r--src/ephy-favorites-menu.c8
2 files changed, 16 insertions, 4 deletions
diff --git a/embed/find-dialog.c b/embed/find-dialog.c
index 7dad18ddf..b46930e98 100755
--- a/embed/find-dialog.c
+++ b/embed/find-dialog.c
@@ -310,13 +310,15 @@ find_get_info (EphyDialog *dialog)
/* get the search string from the entry field */
ephy_dialog_get_value (dialog, WORD_PROP, &word);
- search_string = g_strdup(g_value_get_string (&word));
+ search_string = g_strdup (g_value_get_string (&word));
g_value_unset (&word);
/* don't do null searches */
- if (search_string && search_string[0] == '\0')
+ if (search_string == NULL || search_string[0] == '\0')
{
set_navigation_flags (find_dialog, 0);
+ g_free (search_string);
+
return;
}
@@ -383,6 +385,12 @@ find_dialog_finalize (GObject *object)
g_return_if_fail (dialog->priv != NULL);
+ if (dialog->priv->properties != NULL)
+ {
+ g_free (dialog->priv->properties->search_string);
+ g_free (dialog->priv->properties);
+ }
+
unset_old_embed (dialog);
g_free (dialog->priv);
diff --git a/src/ephy-favorites-menu.c b/src/ephy-favorites-menu.c
index 11af64de5..11d341062 100644
--- a/src/ephy-favorites-menu.c
+++ b/src/ephy-favorites-menu.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2002 Ricardo Fernández Pascual
+ * Copyright (C) 2002 Ricardo Fernández Pascual
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -134,10 +134,12 @@ ephy_favorites_menu_rebuild (EphyFavoritesMenu *wrhm)
for (i = 0; i < children->len; i++)
{
- char *verb = g_strdup_printf ("GoFav%d", i);
+ char *verb;
EphyNode *node;
EggAction *action;
+ verb = g_strdup_printf ("GoFav%d", i);
+
node = g_ptr_array_index (children, i);
action = ephy_bookmark_action_new (verb,
@@ -153,6 +155,8 @@ ephy_favorites_menu_rebuild (EphyFavoritesMenu *wrhm)
g_string_append (xml, "\" verb=\"");
g_string_append (xml, verb);
g_string_append (xml, "\"/>\n");
+
+ g_free (verb);
}
ephy_node_thaw (fav);