[empathy/gnome-3-2] don't leak uri returned by g_file_get_uri()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-3-2] don't leak uri returned by g_file_get_uri()
- Date: Mon, 14 Nov 2011 14:38:50 +0000 (UTC)
commit 5cd0c94a4ffcaa695947a344836f05c516b8afe4
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Nov 14 12:39:58 2011 +0100
don't leak uri returned by g_file_get_uri()
God I hate _get functions returning new memory...
https://bugzilla.gnome.org/show_bug.cgi?id=663873
libempathy-gtk/empathy-log-window.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 5ca1d41..98b5235 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -617,6 +617,7 @@ empathy_log_window_init (EmpathyLogWindow *self)
GFile *gfile;
GtkWidget *vbox, *accounts, *search, *label, *closeitem;
GtkWidget *scrolledwindow_events;
+ gchar *uri;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
EMPATHY_TYPE_LOG_WINDOW, EmpathyLogWindowPriv);
@@ -759,9 +760,10 @@ empathy_log_window_init (EmpathyLogWindow *self)
gfile = g_file_new_for_path (filename);
g_free (filename);
- webkit_web_view_load_uri (WEBKIT_WEB_VIEW (self->priv->webview),
- g_file_get_uri (gfile));
+ uri = g_file_get_uri (gfile);
+ webkit_web_view_load_uri (WEBKIT_WEB_VIEW (self->priv->webview), uri);
g_object_unref (gfile);
+ g_free (uri);
/* handle all navigation externally */
g_signal_connect (self->priv->webview, "navigation-policy-decision-requested",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]