scd: Fix Error checking in additioal app selection.

* scd/app.c (select_additional_application): Return error for unknown
NAME.
--

ERR was only set but not used.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-09-04 12:27:54 +02:00
parent 5cf5a04bae
commit fa25837942
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 3 additions and 2 deletions

View File

@ -744,7 +744,8 @@ select_additional_application_internal (card_t card, apptype_t req_apptype)
* reselect by maybe_switch_app after the select we just did. */
app->next = card->app;
card->app = app;
log_info ("added app '%s' to the card context\n", strapptype (app->apptype));
log_info ("added app '%s' to the card context and switched\n",
strapptype (app->apptype));
leave:
if (err)
@ -766,7 +767,7 @@ select_additional_application (ctrl_t ctrl, const char *name)
req_apptype = apptype_from_name (name);
if (!req_apptype)
err = gpg_error (GPG_ERR_NOT_FOUND);
return gpg_error (GPG_ERR_NOT_FOUND);
card = ctrl->card_ctx;
if (!card)