ecdh & ecdsa: avoid some possible memory leaks in error conditions.