]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Coverity 1458439: fix resource leak
authorPauli <paul.dale@oracle.com>
Sun, 16 Feb 2020 07:58:45 +0000 (17:58 +1000)
committerPauli <paul.dale@oracle.com>
Mon, 17 Feb 2020 09:29:04 +0000 (19:29 +1000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11101)

providers/implementations/asymciphers/rsa_enc.c

index 2cce8474cd63e99b93a6e8be16786355dc7f269f..87349ed64b3423f08ac7b1681458efaef2a565f1 100644 (file)
@@ -119,6 +119,7 @@ static int rsa_encrypt(void *vprsactx, unsigned char *out, size_t *outlen,
             return 0;
         }
         if (prsactx->oaep_md == NULL) {
+            OPENSSL_free(tbuf);
             prsactx->oaep_md = EVP_MD_fetch(prsactx->libctx, "SHA-1", NULL);
             PROVerr(0, ERR_R_INTERNAL_ERROR);
             return 0;