From f46eb1fc2086fe0bb952da52c276a1b6ded868dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 26 May 2015 15:52:26 +0200 Subject: libnm-glib: do not access NULL GError variable (rh #1224819) dbus_g_proxy_call() should set GError if returning FALSE. But apparently there is a bug in dbus-glib and the error can be NULL. https://bugzilla.redhat.com/show_bug.cgi?id=1224819 --- libnm-glib/nm-client.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c index d62a8b6320..40add09c76 100644 --- a/libnm-glib/nm-client.c +++ b/libnm-glib/nm-client.c @@ -782,8 +782,9 @@ nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active) DBUS_TYPE_G_OBJECT_PATH, path, G_TYPE_INVALID, G_TYPE_INVALID)) { - g_warning ("Could not deactivate connection '%s': %s", path, error->message); - g_error_free (error); + g_warning ("Could not deactivate connection '%s': %s", + path, error ? error->message : "(unknown)"); + g_clear_error (&error); } } @@ -1094,8 +1095,9 @@ nm_client_networking_set_enabled (NMClient *client, gboolean enable) G_TYPE_BOOLEAN, enable, G_TYPE_INVALID, G_TYPE_INVALID)) { - g_warning ("Error enabling/disabling networking: %s", err->message); - g_error_free (err); + g_warning ("Error enabling/disabling networking: %s", + err ? err->message : "(unknown)"); + g_clear_error (&err); } } -- cgit v1.2.1