ecc: Fix memory leak in the error case of ecc_encrypt_raw