... sync
authorVolker Birk <vb@pep-project.org>
Fri, 31 May 2019 12:27:39 +0200
branchsync
changeset 3794e7f94d975542
parent 3791 f32545eaeefc
child 3795 8a86eb681032
child 3796 442937f4fabb
...
sync/cond_act_sync.yml2
     1.1 --- a/sync/cond_act_sync.yml2	Fri May 31 01:58:02 2019 +0200
     1.2 +++ b/sync/cond_act_sync.yml2	Fri May 31 12:27:39 2019 +0200
     1.3 @@ -364,8 +364,10 @@
     1.4          return status;
     1.5  
     1.6      identity_list *il = IdentityList_to_identity_list(&session->sync_state.keysync.ownIdentities, NULL);
     1.7 -    if (!il)
     1.8 +    if (!il) {
     1.9 +        free(user_id);
    1.10          return PEP_OUT_OF_MEMORY;
    1.11 +    }
    1.12      
    1.13      identity_list *oil = session->sync_state.own.identities;
    1.14  
    1.15 @@ -377,11 +379,18 @@
    1.16          status = is_own_address(session, ident->address, &is_own_already);
    1.17          if (status) {
    1.18              free_identity_list(il);
    1.19 +            free(user_id);
    1.20              return status;
    1.21          }
    1.22  
    1.23          free(ident->user_id);
    1.24 -        ident->user_id = user_id;
    1.25 +        ident->user_id = strdup(user_id);
    1.26 +        assert(ident->user_id);
    1.27 +        if (!ident->user_id) {
    1.28 +            free_identity_list(il);
    1.29 +            free(user_id);
    1.30 +            return PEP_OUT_OF_MEMORY;
    1.31 +        }
    1.32  
    1.33          if (is_own_already) {
    1.34              ident->comm_type = PEP_ct_pEp;
    1.35 @@ -391,16 +400,19 @@
    1.36              oil = identity_list_add(oil, ident);
    1.37              if (!oil) {
    1.38                  free_identity_list(il);
    1.39 +                free(user_id);
    1.40                  return PEP_OUT_OF_MEMORY;
    1.41              }
    1.42              status = myself(session, ident);
    1.43          }
    1.44          if (status) {
    1.45              free_identity_list(il);
    1.46 +            free(user_id);
    1.47              return status;
    1.48          }
    1.49      }
    1.50  
    1.51 +    free(user_id);
    1.52      free_identity_list(il);
    1.53  ||
    1.54