aboutsummaryrefslogtreecommitdiffstats
path: root/embed
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 /embed
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.
Diffstat (limited to 'embed')
-rwxr-xr-xembed/find-dialog.c12
1 files changed, 10 insertions, 2 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);