capi_get_key: check for NULL after allocating key
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
8607322765
commit
b1a08ac71f
@ -1498,6 +1498,8 @@ static CAPI_KEY *capi_get_key(CAPI_CTX *ctx, const TCHAR *contname, TCHAR *provn
|
||||
CAPI_KEY *key;
|
||||
DWORD dwFlags = 0;
|
||||
key = OPENSSL_malloc(sizeof(CAPI_KEY));
|
||||
if (key == NULL)
|
||||
return NULL;
|
||||
if (sizeof(TCHAR)==sizeof(char))
|
||||
CAPI_trace(ctx, "capi_get_key, contname=%s, provname=%s, type=%d\n",
|
||||
contname, provname, ptype);
|
||||
|
Loading…
x
Reference in New Issue
Block a user