diff options
author | Bernard Kolobara <[email protected]> | 2019-07-23 09:33:33 +0200 |
---|---|---|
committer | Bernard Kolobara <[email protected]> | 2019-07-23 09:33:33 +0200 |
commit | dc6d70bc727c202860e84ec6cc82081486efbda5 (patch) | |
tree | 6570c8ac26f38fd3bf01d24922a534b0dac3d083 /lib/crypto | |
parent | 8cc550ce03309c36e8626206b6a7b758220a9481 (diff) | |
download | otp-dc6d70bc727c202860e84ec6cc82081486efbda5.tar.gz otp-dc6d70bc727c202860e84ec6cc82081486efbda5.tar.bz2 otp-dc6d70bc727c202860e84ec6cc82081486efbda5.zip |
Fix return value in case of error
Diffstat (limited to 'lib/crypto')
-rw-r--r-- | lib/crypto/c_src/evp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypto/c_src/evp.c b/lib/crypto/c_src/evp.c index 19dbd234f6..fb6495a640 100644 --- a/lib/crypto/c_src/evp.c +++ b/lib/crypto/c_src/evp.c @@ -125,9 +125,9 @@ ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a if ((ctx = EVP_PKEY_CTX_new_id(type, NULL)) == NULL) goto bad_arg; if (EVP_PKEY_keygen_init(ctx) != 1) - goto bad_arg; + goto err; if (EVP_PKEY_keygen(ctx, &pkey) != 1) - goto bad_arg; + goto err; } else { if (!enif_inspect_binary(env, argv[1], &prv_key)) goto bad_arg; |