diff options
Diffstat (limited to 'lib/crypto/c_src/hmac.c')
-rw-r--r-- | lib/crypto/c_src/hmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/crypto/c_src/hmac.c b/lib/crypto/c_src/hmac.c index a5ff35c706..9418e7950e 100644 --- a/lib/crypto/c_src/hmac.c +++ b/lib/crypto/c_src/hmac.c @@ -169,7 +169,8 @@ ERL_NIF_TERM hmac_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) ret = atom_notsup; done: - enif_release_resource(obj); + if (obj) + enif_release_resource(obj); return ret; } |