From 19c5ab315d5b5ff9a2cb5e1a25cd32998a7bf72a Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Wed, 6 Mar 2019 08:53:47 +0100 Subject: [PATCH] fixed uninitialized use of variable --- src/pkcs11/framework-pkcs15.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pkcs11/framework-pkcs15.c b/src/pkcs11/framework-pkcs15.c index 09b2e456..bf27516a 100644 --- a/src/pkcs11/framework-pkcs15.c +++ b/src/pkcs11/framework-pkcs15.c @@ -1453,9 +1453,11 @@ pkcs15_create_tokens(struct sc_pkcs11_card *p11card, struct sc_app_info *app_inf /* Find out framework data corresponding to the given application */ fw_data = get_fw_data(p11card, app_info, &idx); - if (!fw_data && p11card) { - sc_log(context, "Create slot for the non-binded card"); - pkcs15_create_slot(p11card, NULL, NULL, app_info, &slot); + if (!fw_data) { + if (p11card) { + sc_log(context, "Create slot for the non-binded card"); + pkcs15_create_slot(p11card, NULL, NULL, app_info, &slot); + } return CKR_OK; } sc_log(context, "Use FW data with index %i; fw_data->p15_card %p", idx, fw_data->p15_card);