diff options
Diffstat (limited to '')
-rw-r--r-- | g10/ChangeLog | 3 | ||||
-rw-r--r-- | g10/import.c | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 79eed36b5..97eaa5e63 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,8 @@ 2006-05-22 David Shaw <[email protected]> + * import.c (import_one): Fix bug when importing a new key from a + file. + * getkey.c (get_pubkey_byname), import.c (import_one): Fix key selection problem when auto-key-locate returns a list of keys, not all of which are usable (revoked, expired, etc). Noted by Simon diff --git a/g10/import.c b/g10/import.c index 81aa506a4..97d4b8f39 100644 --- a/g10/import.c +++ b/g10/import.c @@ -978,15 +978,13 @@ import_one( const char *fname, KBNODE keyblock, struct stats_s *stats, } else if(new_key) { - if(fpr && stats->imported==1) + if(fpr) { xfree(*fpr); - *fpr=fingerprint_from_pk(pk,NULL,fpr_len); - } - else - { - xfree(*fpr); - *fpr=NULL; + if(stats->imported==1) + *fpr=fingerprint_from_pk(pk,NULL,fpr_len); + else + *fpr=NULL; } revocation_present(keyblock); |