[openssl/openssl] 17703a: Fix a memory leak in ossl_method_store_add()

matt noreply at reply.github.openssl.org
Thu Jun 9 10:44:16 UTC 2022


  Branch: refs/heads/openssl-3.0
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 17703a0e65618795d01c67ddaf0bd28b08dd3955
      https://github.openssl.org/openssl/openssl/commit/17703a0e65618795d01c67ddaf0bd28b08dd3955
  Author: Matt Caswell <matt at openssl.org>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M crypto/property/property.c

  Log Message:
  -----------
  Fix a memory leak in ossl_method_store_add()

If the call to ossl_prop_defn_set() fails then the OSSL_PROPERTY_LIST
we just created will leak.

Found as a result of:
https://github.com/openssl/openssl/pull/18355#issuecomment-1139499881

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18458)

(cherry picked from commit fed8dbea27b7e01ee934951b25c6ffd40ad1d5c3)


  Commit: 6c98a46c4742d40870db83142309c94b66d41e25
      https://github.openssl.org/openssl/openssl/commit/6c98a46c4742d40870db83142309c94b66d41e25
  Author: Matt Caswell <matt at openssl.org>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M crypto/property/defn_cache.c

  Log Message:
  -----------
  Assert that a property definition cache entry is the first

When adding a property definition cache entry for a given property query
string we add an assert that we are not replacing an existing entry. If we
are then that indicates a bug in the caller.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18458)

(cherry picked from commit 5f4b3db624a83b812f23412e698ffd9c4284f87a)


Compare: https://github.openssl.org/openssl/openssl/compare/060f2bcae106...6c98a46c4742


More information about the openssl-commits mailing list