pkey_gost_ctrl: check for NULL after allocating pctx->shared_ukm

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
pkey_gost_mac_keygen: check for NULL after allocating keydata

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
capi_get_provname: free name on error if it was malloc'ed

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
capi_cert_get_fname: check for NULL after allocating wfname

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
capi_get_key: check for NULL after allocating key

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
dtls1_process_heartbeat: check for NULL after allocating buffer

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
dtls1_heartbeat: check for NULL after allocating s->cert->ctypes

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
dtls1_new: free s on error path

Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl_cert_dup: Fix memory leak

Always use goto err on failure and call ssl_cert_free() on the error path so all
fields and "ret" itself are freed

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl_create_cipher_list: check whether push onto cipherstack succeeds

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
capi_get_provname: Check return values

Reviewed-by: Richard Levitte <levitte@openssl.org>
Replace GOST_R_MALLOC_FAILURE and GOST_R_NO_MEMORY with ERR_R_MALLOC_FAILURE

Reviewed-by: Richard Levitte <levitte@openssl.org>