[openssl/openssl] 4e0930: speed: Fix memory leaks

Ingo Franzki noreply at github.com
Wed Oct 25 08:27:16 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 4e09305ee092dea14b7d4feb3fac2889b41428f3
      https://github.com/openssl/openssl/commit/4e09305ee092dea14b7d4feb3fac2889b41428f3
  Author: Ingo Franzki <ifranzki at linux.ibm.com>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M apps/speed.c

  Log Message:
  -----------
  speed: Fix memory leaks

Free the PKEYs created for KEM and signature algorithms.
Free the encrypt/decrypt PKEY contexts for RSA.

Signed-off-by: Ingo Franzki <ifranzki at linux.ibm.com>

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/22399)


  Commit: df5f419b14de9ff47082c42f2a2db6557ceca84f
      https://github.com/openssl/openssl/commit/df5f419b14de9ff47082c42f2a2db6557ceca84f
  Author: Ingo Franzki <ifranzki at linux.ibm.com>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M apps/speed.c

  Log Message:
  -----------
  speed: Correct handling of async_jobs for KEM and signature algos

Setup the loopargs array for all jobs, not only for the very first one.

It may fail with "Could not allocate 0 bytes for sig sign loop" and/or will
cause the loop functions to fail silently, because they operate on a NULL
PKEY context when "-async_jobs <n>" is specified.

Signed-off-by: Ingo Franzki <ifranzki at linux.ibm.com>

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/22399)


Compare: https://github.com/openssl/openssl/compare/66f4782f1452...df5f419b14de


More information about the openssl-commits mailing list