[network-manager-applet] editor: fix warning when retrieving firewall zones



commit 8d803fddf62de3a8beea0df5e93a84885a14c4ed
Author: Dan Williams <dcbw redhat com>
Date:   Sat Feb 28 08:25:11 2015 -0600

    editor: fix warning when retrieving firewall zones
    
    'variant' will be NULL if firewalld isn't running, so don't try to
    unref NULL.

 src/connection-editor/nm-connection-list.c |    1 -
 src/connection-editor/page-general.c       |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index d74995d..bfed52a 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -761,7 +761,6 @@ get_parent_iter_for_connection (NMConnectionList *list,
                } while (gtk_tree_model_iter_next (list->model, iter));
        }
 
-       g_warning ("Unsupported connection type '%s'", str_type);
        return FALSE;
 }
 
diff --git a/src/connection-editor/page-general.c b/src/connection-editor/page-general.c
index 9924620..e0ad470 100644
--- a/src/connection-editor/page-general.c
+++ b/src/connection-editor/page-general.c
@@ -88,6 +88,7 @@ get_zones_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data)
                        g_warning ("Failed to get zones from FirewallD: invalid reply type '%s'",
                                   g_variant_get_type_string (variant));
                }
+               g_variant_unref (variant);
        } else if (!g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN))
                g_warning ("Failed to get zones from FirewallD: %s", error->message);
 
@@ -96,7 +97,6 @@ get_zones_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data)
                populate_firewall_zones_ui (self);
 
        g_clear_error (&error);
-       g_variant_unref (variant);
        g_clear_object (&priv->cancellable);
        g_clear_object (&priv->fw_proxy);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]