aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-14 19:39:58 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-14 22:37:22 +0800
commit4b81e8ff10c3973388cd022e243237cd32262b23 (patch)
treef1e3e66dbff497b0035ca067fc0ff50d6b195428 /libempathy-gtk
parentd75899267ec482020f564117f34ca1e8f2965711 (diff)
downloadgsoc2013-empathy-4b81e8ff10c3973388cd022e243237cd32262b23.tar
gsoc2013-empathy-4b81e8ff10c3973388cd022e243237cd32262b23.tar.gz
gsoc2013-empathy-4b81e8ff10c3973388cd022e243237cd32262b23.tar.bz2
gsoc2013-empathy-4b81e8ff10c3973388cd022e243237cd32262b23.tar.lz
gsoc2013-empathy-4b81e8ff10c3973388cd022e243237cd32262b23.tar.xz
gsoc2013-empathy-4b81e8ff10c3973388cd022e243237cd32262b23.tar.zst
gsoc2013-empathy-4b81e8ff10c3973388cd022e243237cd32262b23.zip
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
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-log-window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index c6f526daa..6fd1ff827 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -603,6 +603,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);
@@ -745,9 +746,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",