sc-hsm: Prevent double-free crash if key generation fails

Fixes #262 (SEGV when reader does not support extended length ADPU)