fixing ENGINE-404
authorVolker Birk <vb@pep.foundation>
Thu, 15 Mar 2018 14:09:49 +0100
changeset 2575b9697c489261
parent 2574 f2e0646c4b0d
child 2576 2eafd0cc0c8c
fixing ENGINE-404
src/keymanagement.c
     1.1 --- a/src/keymanagement.c	Thu Mar 15 14:00:07 2018 +0100
     1.2 +++ b/src/keymanagement.c	Thu Mar 15 14:09:49 2018 +0100
     1.3 @@ -661,9 +661,10 @@
     1.4                                  
     1.5                                  // Ok, we have a real ID. Copy it!
     1.6                                  identity->user_id = strdup(this_uid);
     1.7 -                                
     1.8 +                                assert(identity->user_id);
     1.9                                  if (!identity->user_id)
    1.10 -                                    status = PEP_OUT_OF_MEMORY;
    1.11 +                                    goto enomem;
    1.12 +
    1.13                                  stored_ident = this_id;
    1.14                                  
    1.15                                  break;                                
    1.16 @@ -798,6 +799,7 @@
    1.17  
    1.18  pep_free:
    1.19      free(default_own_id);
    1.20 +    free_identity(stored_ident);
    1.21      return status;
    1.22  }
    1.23