Fix for ENGINE-356
authorKrista Bennett <krista@pep-project.org>
Thu, 15 Feb 2018 00:36:33 +0100
changeset 250727d82316d474
parent 2506 876532219d20
child 2508 3f9d0cb2cb56
child 2509 dde6a233c9dd
Fix for ENGINE-356
src/keymanagement.c
     1.1 --- a/src/keymanagement.c	Thu Feb 15 00:15:05 2018 +0100
     1.2 +++ b/src/keymanagement.c	Thu Feb 15 00:36:33 2018 +0100
     1.3 @@ -1225,7 +1225,7 @@
     1.4          goto pep_free;
     1.5      
     1.6      // remove as default if necessary
     1.7 -    if (strcmp(tmp_ident->fpr, ident->fpr) == 0) {
     1.8 +    if (!EMPTYSTR(tmp_ident->fpr) && strcmp(tmp_ident->fpr, ident->fpr) == 0) {
     1.9          free(tmp_ident->fpr);
    1.10          tmp_ident->fpr = NULL;
    1.11          tmp_ident->comm_type = PEP_ct_unknown;
    1.12 @@ -1296,7 +1296,6 @@
    1.13          goto pep_free;
    1.14      }
    1.15      
    1.16 -    
    1.17      // Save the input fpr
    1.18      cached_fpr = strdup(ident->fpr);
    1.19