After ossl_method_up_ref() succeeds, impl_free() should be called to free impl->method.
Fixes: 860ecfd ("property: check return values from the property locking
calls.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27564)
(cherry picked from commit
00c531a5e327320f0ec78ce4b153fac65ebca229)
/* Insert into the hash table if required */
if (!ossl_property_write_lock(store)) {
- OPENSSL_free(impl);
+ impl_free(impl);
return 0;
}
ossl_method_cache_flush(store, nid);