mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Fix Coverity issues
CID 1453954 & 1453955 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9977)
This commit is contained in:
parent
648b53b88e
commit
12fca1afd2
@ -285,9 +285,11 @@ static void aes_ocb_freectx(void *vctx)
|
||||
{
|
||||
PROV_AES_OCB_CTX *ctx = (PROV_AES_OCB_CTX *)vctx;
|
||||
|
||||
aes_generic_ocb_cleanup(ctx);
|
||||
OPENSSL_cleanse(ctx->base.iv, sizeof(ctx->base.iv));
|
||||
OPENSSL_clear_free(ctx, sizeof(*ctx));
|
||||
if (ctx != NULL) {
|
||||
aes_generic_ocb_cleanup(ctx);
|
||||
OPENSSL_cleanse(ctx->base.iv, sizeof(ctx->base.iv));
|
||||
OPENSSL_clear_free(ctx, sizeof(*ctx));
|
||||
}
|
||||
}
|
||||
|
||||
static void *aes_ocb_dupctx(void *vctx)
|
||||
@ -300,8 +302,10 @@ static void *aes_ocb_dupctx(void *vctx)
|
||||
return NULL;
|
||||
}
|
||||
*ret = *in;
|
||||
if (!aes_generic_ocb_copy_ctx(ret, in))
|
||||
if (!aes_generic_ocb_copy_ctx(ret, in)) {
|
||||
OPENSSL_free(ret);
|
||||
ret = NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -141,9 +141,10 @@ end:
|
||||
OPENSSL_free(module_checksum);
|
||||
OPENSSL_free(indicator_checksum);
|
||||
|
||||
(*st->bio_free_cb)(bio_indicator);
|
||||
(*st->bio_free_cb)(bio_module);
|
||||
|
||||
if (st != NULL) {
|
||||
(*st->bio_free_cb)(bio_indicator);
|
||||
(*st->bio_free_cb)(bio_module);
|
||||
}
|
||||
FIPS_state = ok ? FIPS_STATE_RUNNING : FIPS_STATE_ERROR;
|
||||
|
||||
return ok;
|
||||
|
Loading…
Reference in New Issue
Block a user