[evince] [shell] Plug refcount leaks
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [shell] Plug refcount leaks
- Date: Tue, 25 May 2010 07:44:21 +0000 (UTC)
commit f480eea33f494d7e28ab82cb2cf6105861886c6a
Author: Christian Persch <chpe gnome org>
Date: Mon May 10 00:27:26 2010 +0200
[shell] Plug refcount leaks
shell/ev-application.c | 7 ++++---
shell/ev-daemon.c | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/shell/ev-application.c b/shell/ev-application.c
index f9ba626..136fbb6 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -341,7 +341,7 @@ ev_application_register_uri (EvApplication *application,
const gchar *search_string,
guint timestamp)
{
- GVariant *value;
+ GVariant *value, *value2;
const gchar *owner;
GVariantBuilder builder;
GError *error = NULL;
@@ -404,7 +404,7 @@ ev_application_register_uri (EvApplication *application,
g_variant_builder_add (&builder, "u", timestamp);
- value = g_dbus_connection_invoke_method_sync
+ value2 = g_dbus_connection_invoke_method_sync
(application->connection,
owner,
APPLICATION_DBUS_OBJECT_PATH,
@@ -415,12 +415,13 @@ ev_application_register_uri (EvApplication *application,
-1,
NULL,
&error);
- if (value == NULL) {
+ if (value2 == NULL) {
g_warning ("%s", error->message);
g_error_free (error);
}
g_variant_unref (value);
+ g_variant_unref (value2);
/* Do not continue opening this document */
return FALSE;
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c
index fcf472d..315636a 100644
--- a/shell/ev-daemon.c
+++ b/shell/ev-daemon.c
@@ -402,6 +402,7 @@ main (gint argc, gchar **argv)
g_dbus_node_info_unref (introspection_data);
g_list_foreach (ev_daemon_docs, (GFunc)ev_doc_free, NULL);
g_list_free (ev_daemon_docs);
+ g_object_unref (connection);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]