pkcs15-myeid: Return value checking

This commit is contained in:
Jakub Jelen 2018-09-27 11:47:44 +02:00 committed by Frank Morgner
parent 8e0078a6f9
commit b8133c2545
1 changed files with 8 additions and 1 deletions

View File

@ -434,7 +434,11 @@ _add_supported_algo(struct sc_profile *profile, struct sc_pkcs15_card *p15card,
unsigned operations, unsigned mechanism, const struct sc_object_id *oid)
{
struct sc_supported_algo_info *algo;
struct sc_context *ctx = p15card->card->ctx;
algo = sc_pkcs15_get_supported_algo(p15card, operations, mechanism);
int rv;
LOG_FUNC_CALLED(ctx);
if (!algo) {
unsigned ref = 1, ii;
@ -452,7 +456,10 @@ _add_supported_algo(struct sc_profile *profile, struct sc_pkcs15_card *p15card,
}
}
sc_pkcs15_add_supported_algo_ref(object, algo);
rv = sc_pkcs15_add_supported_algo_ref(object, algo);
if (rv != SC_SUCCESS) {
sc_log(ctx, "Failed to add algorithms refs");
}
}
static void