diff options
-rw-r--r-- | crypto/property/property.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/property/property.c b/crypto/property/property.c index 83f49d92d5..790abfd13b 100644 --- a/crypto/property/property.c +++ b/crypto/property/property.c @@ -312,7 +312,11 @@ int ossl_method_store_add(OSSL_METHOD_STORE *store, const OSSL_PROVIDER *prov, impl->properties = ossl_parse_property(store->ctx, properties); if (impl->properties == NULL) goto err; - ossl_prop_defn_set(store->ctx, properties, impl->properties); + if (!ossl_prop_defn_set(store->ctx, properties, impl->properties)) { + ossl_property_free(impl->properties); + impl->properties = NULL; + goto err; + } } alg = ossl_method_store_retrieve(store, nid); |