[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[openssl-gost] [gost-engine/engine] da0c64: gost_prov: OPENSSL_free what is OPENSSL_zalloc'd
Branch: refs/heads/master
Home: https://github.com/gost-engine/engine
Commit: da0c648be057d9d9277a5a17411d4acb5dfe710f
https://github.com/gost-engine/engine/commit/da0c648be057d9d9277a5a17411d4acb5dfe710f
Author: Vitaly Chikunov <vt@altlinux.org>
Date: 2022-01-10 (Mon, 10 Jan 2022)
Changed paths:
M gost_prov.c
Log Message:
-----------
gost_prov: OPENSSL_free what is OPENSSL_zalloc'd
*** CID 345254: API usage errors (ALLOC_FREE_MISMATCH)
/gost_prov.c: 71 in provider_ctx_new()
65 && populate_gost_engine(ctx->e)) {
66 ctx->core_handle = core;
67
68 /* Ugly hack */
69 err_handle = ctx->proverr_handle;
70 } else {
>>> CID 345254: API usage errors (ALLOC_FREE_MISMATCH)
>>> Calling "provider_ctx_free" frees "ctx" using "free" but it should have been freed using "CRYPTO_free".
71 provider_ctx_free(ctx);
72 ctx = NULL;
73 }
74 return ctx;
75 }
Fixes: f5a3951 ("gost_prov: Avoid access to unallocated memory")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>