aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-03-11 21:48:19 +0800
committerMilan Crha <mcrha@redhat.com>2011-03-11 21:48:19 +0800
commit3712e3981b2056401c57c981160c96ff931f612c (patch)
tree2be1dbc10985982b10a8eb91b24f873595a57465 /modules
parent38891b8f30ae2c4af670e1cd0cad7706090bfe51 (diff)
downloadgsoc2013-evolution-3712e3981b2056401c57c981160c96ff931f612c.tar
gsoc2013-evolution-3712e3981b2056401c57c981160c96ff931f612c.tar.gz
gsoc2013-evolution-3712e3981b2056401c57c981160c96ff931f612c.tar.bz2
gsoc2013-evolution-3712e3981b2056401c57c981160c96ff931f612c.tar.lz
gsoc2013-evolution-3712e3981b2056401c57c981160c96ff931f612c.tar.xz
gsoc2013-evolution-3712e3981b2056401c57c981160c96ff931f612c.tar.zst
gsoc2013-evolution-3712e3981b2056401c57c981160c96ff931f612c.zip
Bug #644301 - Invalid GVariant format in NetworkManager module
Diffstat (limited to 'modules')
-rw-r--r--modules/connman/evolution-connman.c4
-rw-r--r--modules/network-manager/evolution-network-manager.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/connman/evolution-connman.c b/modules/connman/evolution-connman.c
index 10a6fad295..50b5cf37fb 100644
--- a/modules/connman/evolution-connman.c
+++ b/modules/connman/evolution-connman.c
@@ -111,7 +111,7 @@ connman_check_initial_state (EConnMan *extension)
extension->connection, message,
G_DBUS_SEND_MESSAGE_FLAGS_NONE, 100, NULL, NULL, &error);
- if (response != NULL) {
+ if (response != NULL && !g_dbus_message_to_gerror (response, &error)) {
gchar *state = NULL;
GVariant *body = g_dbus_message_get_body (response);
@@ -122,6 +122,8 @@ connman_check_initial_state (EConnMan *extension)
g_warning ("%s: %s", G_STRFUNC, error ? error->message : "Unknown error");
if (error)
g_error_free (error);
+ if (response)
+ g_object_unref (response);
g_object_unref (message);
return;
}
diff --git a/modules/network-manager/evolution-network-manager.c b/modules/network-manager/evolution-network-manager.c
index 1c15a84a16..0ea86e1e92 100644
--- a/modules/network-manager/evolution-network-manager.c
+++ b/modules/network-manager/evolution-network-manager.c
@@ -139,7 +139,7 @@ network_manager_check_initial_state (ENetworkManager *extension)
extension->connection, message,
G_DBUS_SEND_MESSAGE_FLAGS_NONE, 100, NULL, NULL, &error);
- if (response != NULL) {
+ if (response != NULL && !g_dbus_message_to_gerror (response, &error)) {
GVariant *body = g_dbus_message_get_body (response);
g_variant_get (body, "(u)", &state);
@@ -147,6 +147,8 @@ network_manager_check_initial_state (ENetworkManager *extension)
g_warning ("%s: %s", G_STRFUNC, error ? error->message : "Unknown error");
if (error)
g_error_free (error);
+ if (response)
+ g_object_unref (response);
g_object_unref (message);
return;
}