X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=providers%2Fimplementations%2Fkdfs%2Fsshkdf.c;h=508fb6350ade9d24362ae3f946bf60ec0282340f;hp=23a0caac5fb3a8bf25622dc9f50dcd23f3a65d57;hb=3c659415465a29d41cdfb6866683af8690de1527;hpb=af3e7e1bccbed8e3b958488a07daf5a8f4115fa9 diff --git a/providers/implementations/kdfs/sshkdf.c b/providers/implementations/kdfs/sshkdf.c index 23a0caac5f..508fb6350a 100644 --- a/providers/implementations/kdfs/sshkdf.c +++ b/providers/implementations/kdfs/sshkdf.c @@ -16,10 +16,10 @@ #include "internal/cryptlib.h" #include "internal/numbers.h" #include "crypto/evp.h" -#include "internal/provider_ctx.h" -#include "internal/providercommonerr.h" +#include "prov/provider_ctx.h" +#include "prov/providercommonerr.h" #include "prov/implementations.h" -# include "internal/provider_util.h" +# include "prov/provider_util.h" /* See RFC 4253, Section 7.2 */ static OSSL_OP_kdf_newctx_fn kdf_sshkdf_new; @@ -63,8 +63,10 @@ static void kdf_sshkdf_free(void *vctx) { KDF_SSHKDF *ctx = (KDF_SSHKDF *)vctx; - kdf_sshkdf_reset(ctx); - OPENSSL_free(ctx); + if (ctx != NULL) { + kdf_sshkdf_reset(ctx); + OPENSSL_free(ctx); + } } static void kdf_sshkdf_reset(void *vctx)