[openssl/openssl] ae4d95: Fix a mem leak in evp_pkey_copy_downgraded()

matt noreply at reply.github.openssl.org
Wed Jun 8 14:41:30 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: ae4d9573ac783dcf26279f461d42d0e261e978f7
      https://github.openssl.org/openssl/openssl/commit/ae4d9573ac783dcf26279f461d42d0e261e978f7
  Author: Matt Caswell <matt at openssl.org>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M crypto/evp/p_lib.c

  Log Message:
  -----------
  Fix a mem leak in evp_pkey_copy_downgraded()

If we get a failure during evp_pkey_copy_downgraded() and on entry *dest
was NULL then we leak the EVP_PKEY that was automatically allocated and
stored in *dest.

Found due to this comment:
https://github.com/openssl/openssl/pull/18355#issuecomment-1145028315

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb at siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18470)




More information about the openssl-commits mailing list