]> www.fi.muni.cz Git - evince.git/commitdiff
[shell] Plug refcount leaks
authorChristian Persch <chpe@gnome.org>
Sun, 9 May 2010 22:27:26 +0000 (00:27 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 25 May 2010 07:37:24 +0000 (09:37 +0200)
shell/ev-application.c
shell/ev-daemon.c

index f9ba62648cfa195e09ee12db369475d65fff7cf2..136fbb6fd2e75f630c300c99f9f1b23136b50d6e 100644 (file)
@@ -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;
index fcf472d8d26ceb017f60e70d2c6b7b86f058407b..315636a3124543f1f09d179e95317550cc4de731 100644 (file)
@@ -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;
 }