EVP: fix reference counting for EVP_CIPHER.
authorPauli <ppzgs1@gmail.com>
Mon, 8 Feb 2021 01:38:21 +0000 (11:38 +1000)
committerPauli <ppzgs1@gmail.com>
Fri, 12 Feb 2021 02:28:55 +0000 (12:28 +1000)
commitaea01d13135565680c7b1bc74222f5b2bf3f66c4
tree7077e5b2375140c999aae2fb5a3ddc0900aa98fd
parent7dce37e2ec3d580eccce65c32f8d60dea600a28a
EVP: fix reference counting for EVP_CIPHER.

Under some circumstances, the reference count for a cipher wasn't updated
properly.  This shows up best when fetches are not being queried but would be
possible if the cache flushed at a bad time.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14126)
crypto/evp/evp_enc.c