mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Allow NULL for free_public_key.
This commit is contained in:
parent
850f09b2e3
commit
6cf8890dc1
8 changed files with 36 additions and 34 deletions
|
@ -1064,8 +1064,7 @@ build_pk_list (ctrl_t ctrl,
|
|||
continue;
|
||||
|
||||
/* Get and check key for the current name. */
|
||||
if (pk)
|
||||
free_public_key (pk);
|
||||
free_public_key (pk);
|
||||
pk = xmalloc_clear( sizeof *pk );
|
||||
pk->req_usage = use;
|
||||
rc = get_pubkey_byname (ctrl, NULL, pk, answer, NULL, NULL, 0, 0 );
|
||||
|
@ -1078,7 +1077,8 @@ build_pk_list (ctrl_t ctrl,
|
|||
/* No validation for a default recipient. */
|
||||
if (!key_present_in_pk_list(pk_list, pk))
|
||||
{
|
||||
free_public_key (pk); pk = NULL;
|
||||
free_public_key (pk);
|
||||
pk = NULL;
|
||||
log_info (_("skipped: public key "
|
||||
"already set as default recipient\n") );
|
||||
}
|
||||
|
@ -1108,7 +1108,8 @@ build_pk_list (ctrl_t ctrl,
|
|||
* present in the list */
|
||||
if (!key_present_in_pk_list(pk_list, pk))
|
||||
{
|
||||
free_public_key(pk); pk = NULL;
|
||||
free_public_key (pk);
|
||||
pk = NULL;
|
||||
log_info(_("skipped: public key already set\n") );
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue