src/keymanagement.c
branchENGINE-289
changeset 2370 b37530bf26fa
parent 2369 5c1d477fd5ad
child 2371 05c495924fde
     1.1 --- a/src/keymanagement.c	Wed Jan 10 08:18:52 2018 +0100
     1.2 +++ b/src/keymanagement.c	Wed Jan 10 09:19:44 2018 +0100
     1.3 @@ -317,15 +317,9 @@
     1.4          if (status != PEP_STATUS_OK) {
     1.5              return status; // FIXME - free mem
     1.6          }
     1.7 -        if (return_id->fpr) {
     1.8 -            if (strcasecmp(stored_ident->fpr, return_id->fpr) != 0) {
     1.9 -                free(return_id->fpr);
    1.10 -                
    1.11 -                // Copy in the result from get_valid_pubkey
    1.12 -                return_id->fpr = strdup(stored_ident->fpr);
    1.13 -            }
    1.14 -            return_id->comm_type = stored_ident->comm_type;            
    1.15 -        }
    1.16 +        free (return_id->fpr);
    1.17 +        return_id->fpr = strdup(stored_ident->fpr);
    1.18 +        return_id->comm_type = stored_ident->comm_type;            
    1.19      }
    1.20      else {
    1.21          return status; // Couldn't find a key.