summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-08-27 10:12:34 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-27 18:55:01 +0200
commitd5f854291336c96a3d2379ecc8c29f00ef516ad9 (patch)
treee98be7d10b42811cf8e77b83ad041fa2c836e0a8 /providers
parent096978f09908ba0f679ff905b0db4861a57eb1c8 (diff)
Coverty fixes for MACs
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9700)
Diffstat (limited to 'providers')
-rw-r--r--providers/common/macs/cmac_prov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/providers/common/macs/cmac_prov.c b/providers/common/macs/cmac_prov.c
index 64ecba2b37..693423130d 100644
--- a/providers/common/macs/cmac_prov.c
+++ b/providers/common/macs/cmac_prov.c
@@ -66,8 +66,9 @@ static void *cmac_new(void *provctx)
|| (macctx->ctx = CMAC_CTX_new()) == NULL) {
OPENSSL_free(macctx);
macctx = NULL;
+ } else {
+ macctx->provctx = provctx;
}
- macctx->provctx = provctx;
return macctx;
}