[gtk+] gtkplacesview: plug leak
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkplacesview: plug leak
- Date: Thu, 15 Oct 2015 17:25:27 +0000 (UTC)
commit 9cc3e63045af9ea2909272d3947304863b6088de
Author: Carlos Soriano <csoriano gnome org>
Date: Wed Oct 14 22:04:35 2015 +0200
gtkplacesview: plug leak
https://bugzilla.gnome.org/show_bug.cgi?id=756568
gtk/gtkplacesview.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 2796c7a..7f5f8a1 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -1829,6 +1829,8 @@ on_address_entry_text_changed (GtkPlacesView *view)
supported = FALSE;
supported_protocols = g_vfs_get_supported_uri_schemes (g_vfs_get_default ());
address = g_strdup (gtk_entry_get_text (GTK_ENTRY (priv->address_entry)));
+ scheme = g_uri_parse_scheme (address);
+
if (strlen (address) > 0)
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (priv->address_entry),
GTK_ENTRY_ICON_SECONDARY,
@@ -1841,8 +1843,6 @@ on_address_entry_text_changed (GtkPlacesView *view)
if (!supported_protocols)
goto out;
- scheme = g_uri_parse_scheme (address);
-
if (!scheme)
goto out;
@@ -1852,6 +1852,7 @@ on_address_entry_text_changed (GtkPlacesView *view)
out:
gtk_widget_set_sensitive (priv->connect_button, supported);
g_free (address);
+ g_free (scheme);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]