[gnome-online-accounts/wip/rishi/kerberos-identity-identifier-missing] kerberos-identity: Fail initialization if an identifier can't be found




commit 7f89c7f652d5da1016b677449d93d3c18419a373
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Oct 13 22:14:07 2022 +0200

    kerberos-identity: Fail initialization if an identifier can't be found
    
    The inability to get an identifier already leads to an error.
    Continuing beyond that point can lead to the verification_error trying
    to clobber it.

 src/goaidentity/goakerberosidentity.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentity.c b/src/goaidentity/goakerberosidentity.c
index 57ab616f..b72ce6ab 100644
--- a/src/goaidentity/goakerberosidentity.c
+++ b/src/goaidentity/goakerberosidentity.c
@@ -985,9 +985,10 @@ goa_kerberos_identity_initable_init (GInitable     *initable,
   if (self->identifier == NULL)
     {
       self->identifier = get_identifier (self, error);
+      if (self->identifier == NULL)
+        return FALSE;
 
-      if (self->identifier != NULL)
-        queue_notify (self, &self->identifier_idle_id, "identifier");
+      queue_notify (self, &self->identifier_idle_id, "identifier");
     }
 
   verification_error = NULL;


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