aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2006-05-22 21:38:13 +0000
committerDavid Shaw <[email protected]>2006-05-22 21:38:13 +0000
commit3bee120e15c2a800c9908cbdc6313b082ac8593c (patch)
tree9207bea7f61d41c3f48bf6f67bf24ea9f8b53662 /g10/import.c
parent2006-05-22 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-3bee120e15c2a800c9908cbdc6313b082ac8593c.tar.gz
gnupg-3bee120e15c2a800c9908cbdc6313b082ac8593c.zip
* import.c (import_one): Fix bug when importing a new key from a file.
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c12
1 files changed, 5 insertions, 7 deletions
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);