pki_crypto: Fix memory leak with EC_KEY_set_public_key().

BUG: https://red.libssh.org/issues/146