summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-06-02 14:42:56 +1000
committerPauli <pauli@openssl.org>2021-06-03 16:15:41 +1000
commitba3ea453b0863a8b7374003dd2e22dea9cece5be (patch)
treed21b0f77c975a35cd9d21ce1cd5408bacad98085 /providers
parent64360304863b3ac93a03dfadf36f9aeffd6a29ce (diff)
Fix errors found by parfait static analyser.
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15579)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/macs/cmac_prov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/providers/implementations/macs/cmac_prov.c b/providers/implementations/macs/cmac_prov.c
index 4f8450475c..2291276035 100644
--- a/providers/implementations/macs/cmac_prov.c
+++ b/providers/implementations/macs/cmac_prov.c
@@ -87,6 +87,8 @@ static void *cmac_dup(void *vsrc)
return NULL;
dst = cmac_new(src->provctx);
+ if (dst == NULL)
+ return NULL;
if (!CMAC_CTX_copy(dst->ctx, src->ctx)
|| !ossl_prov_cipher_copy(&dst->cipher, &src->cipher)) {
cmac_free(dst);