cryptsetup: Fix null pointer dereference (#16987)
cryptsetup: Fix null pointer dereference Fix null pointer dereference in the pkcs11 related code of systemd-cryptsetup
This commit is contained in:
parent
197db625a3
commit
664ad0f6f5
|
@ -212,13 +212,15 @@ int pkcs11_token_login(
|
|||
"Failed to log into security token '%s': %s", token_label, p11_kit_strerror(rv));
|
||||
|
||||
log_info("Successfully logged into security token '%s' via protected authentication path.", token_label);
|
||||
*ret_used_pin = NULL;
|
||||
if (ret_used_pin)
|
||||
*ret_used_pin = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!FLAGS_SET(token_info->flags, CKF_LOGIN_REQUIRED)) {
|
||||
log_info("No login into security token '%s' required.", token_label);
|
||||
*ret_used_pin = NULL;
|
||||
if (ret_used_pin)
|
||||
*ret_used_pin = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue