Commit c522af8e authored by Milan Crha's avatar Milan Crha Committed by Rodrigo Moya
Browse files

Bug #644301 - Invalid GVariant format in NetworkManager module

parent a4170351
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment