[gnome-initial-setup] Check for NULL on um_realm_object_get_common
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] Check for NULL on um_realm_object_get_common
- Date: Tue, 2 Sep 2014 03:38:56 +0000 (UTC)
commit 137b3f43c9a9ef2b21e3ee54dcb8af7a80ed3252
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 1 23:37:58 2014 -0400
Check for NULL on um_realm_object_get_common
um_realm_object_get_common can return NULL, so shouldn't be passed
unchecked to subsequent functions that will de-reference it.
https://bugzilla.gnome.org/show_bug.cgi?id=705274
.../pages/account/um-realm-manager.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/um-realm-manager.c
b/gnome-initial-setup/pages/account/um-realm-manager.c
index 5a20ded..b548593 100644
--- a/gnome-initial-setup/pages/account/um-realm-manager.c
+++ b/gnome-initial-setup/pages/account/um-realm-manager.c
@@ -439,12 +439,14 @@ um_realm_is_configured (UmRealmObject *realm)
{
UmRealmCommon *common;
const gchar *configured;
- gboolean is;
+ gboolean is = FALSE;
common = um_realm_object_get_common (realm);
- configured = um_realm_common_get_configured (common);
- is = configured != NULL && !g_str_equal (configured, "");
- g_object_unref (common);
+ if (common) {
+ configured = um_realm_common_get_configured (common);
+ is = configured != NULL && !g_str_equal (configured, "");
+ g_object_unref (common);
+ }
return is;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]