sc-hsm: Fixed memory checking and removed warning